Skip to content

Commit b316238

Browse files
committed
action_sheet [nfc]: Dartdoc ActionSheetMenuItemButton
1 parent 3214a12 commit b316238

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/widgets/action_sheet.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ void _showActionSheet(
6464
});
6565
}
6666

67+
/// A button in an action sheet.
68+
///
69+
/// When built from server data, the action sheet ignores changes in that data;
70+
/// we intentionally don't live-update the buttons on events.
71+
/// If a button's label, action, or position changes suddenly,
72+
/// it can be confusing and make the on-tap behavior unexpected.
73+
/// Better to let the user decide to tap
74+
/// based on information that's comfortably in their working memory,
75+
/// even if we sometimes have to explain (where we handle the tap)
76+
/// that that information has changed and they need to decide again.
77+
///
78+
/// (Even if we did live-update the buttons, it's possible anyway that a user's
79+
/// action can race with a change that's already been applied on the server,
80+
/// because it takes some time for the server to report changes to us.)
6781
abstract class ActionSheetMenuItemButton extends StatelessWidget {
6882
const ActionSheetMenuItemButton({super.key, required this.pageContext});
6983

0 commit comments

Comments
 (0)