Skip to content

Commit 8ee140d

Browse files
committed
action_sheet [nfc]: Dartdoc ActionSheetMenuItemButton
1 parent 377544a commit 8ee140d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/widgets/action_sheet.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ 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.
6777
abstract class ActionSheetMenuItemButton extends StatelessWidget {
6878
const ActionSheetMenuItemButton({super.key, required this.pageContext});
6979

0 commit comments

Comments
 (0)