@@ -244,7 +244,10 @@ class ScaffoldMessengerState extends State<ScaffoldMessenger> with TickerProvide
244
244
245
245
// SNACKBAR API
246
246
247
- /// Shows a [SnackBar] across all registered [Scaffold] s.
247
+ /// Shows a [SnackBar] across all registered [Scaffold] s. Scaffolds register
248
+ /// to receive snack bars from their closest [ScaffoldMessenger] ancestor.
249
+ /// If there are several registered scaffolds the snack bar is shown
250
+ /// simultaneously on all of them.
248
251
///
249
252
/// A scaffold can show at most one snack bar at a time. If this function is
250
253
/// called while another snack bar is already visible, the given snack bar
@@ -432,7 +435,10 @@ class ScaffoldMessengerState extends State<ScaffoldMessenger> with TickerProvide
432
435
433
436
// MATERIAL BANNER API
434
437
435
- /// Shows a [MaterialBanner] across all registered [Scaffold] s.
438
+ /// Shows a [MaterialBanner] across all registered [Scaffold] s. Scaffolds register
439
+ /// to receive material banners from their closest [ScaffoldMessenger] ancestor.
440
+ /// If there are several registered scaffolds the material banner is shown
441
+ /// simultaneously on all of them.
436
442
///
437
443
/// A scaffold can show at most one material banner at a time. If this function is
438
444
/// called while another material banner is already visible, the given material banner
@@ -1559,6 +1565,12 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
1559
1565
/// app. A bottom sheet can either be persistent, in which case it is shown
1560
1566
/// using the [ScaffoldState.showBottomSheet] method, or modal, in which case
1561
1567
/// it is shown using the [showModalBottomSheet] function.
1568
+ /// * [SnackBar] , which is a lightweight message with an optional action which
1569
+ /// briefly displays at the bottom of the screen. Use the
1570
+ /// [ScaffoldMessengerState.showSnackBar] method to show snack bars.
1571
+ /// * [MaterialBanner] , which displays an important, succinct message, at the
1572
+ /// top of the screen, below the app bar. Use the
1573
+ /// [ScaffoldMessengerState.showMaterialBanner] method to show material banners.
1562
1574
/// * [ScaffoldState] , which is the state associated with this widget.
1563
1575
/// * <https://material.io/design/layout/responsive-layout-grid.html>
1564
1576
/// * Cookbook: [Add a Drawer to a screen] (https://flutter.dev/docs/cookbook/design/drawer)
0 commit comments