Update SnackBar.onVisible documentation (#162448)
## Description This PR updated `SnackBar.onVisible` documentation to explain why it can be call several times. ## Related Issue Fixes [Snackbar onVisible is called twice](https://github.com/flutter/flutter/issues/162377) ## Tests Documentation only
This commit is contained in:
parent
e0aae0d4b2
commit
5b29db924b
@ -464,6 +464,13 @@ class SnackBar extends StatefulWidget {
|
||||
final Animation<double>? animation;
|
||||
|
||||
/// Called the first time that the snackbar is visible within a [Scaffold].
|
||||
///
|
||||
/// When multiple [Scaffold]s are registered to the same [ScaffoldMessengerState],
|
||||
/// [onVisible] is called once for each scaffold.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [ScaffoldMessenger], which manages [SnackBar]s for [Scaffold] descendants.
|
||||
final VoidCallback? onVisible;
|
||||
|
||||
/// The direction in which the SnackBar can be dismissed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user