AdoptAWidget: MaterialBanner (#69530)
This commit is contained in:
parent
97eaf58baa
commit
a371fbcc1b
@ -18,6 +18,30 @@ import 'theme.dart';
|
|||||||
/// They are persistent and non-modal, allowing the user to either ignore them or
|
/// They are persistent and non-modal, allowing the user to either ignore them or
|
||||||
/// interact with them at any time.
|
/// interact with them at any time.
|
||||||
///
|
///
|
||||||
|
/// {@tool dartpad --template=stateless_widget_scaffold}
|
||||||
|
///
|
||||||
|
/// ```dart
|
||||||
|
/// Widget build(BuildContext context) {
|
||||||
|
/// return MaterialBanner(
|
||||||
|
/// padding: const EdgeInsets.all(20),
|
||||||
|
/// content: Text("Hey, I am an Material Banner"),
|
||||||
|
/// leading: Icon(Icons.agriculture_outlined),
|
||||||
|
/// backgroundColor: Colors.grey[300],
|
||||||
|
/// actions: <Widget>[
|
||||||
|
/// FlatButton(
|
||||||
|
/// child: Text("OPEN"),
|
||||||
|
/// onPressed: () {},
|
||||||
|
/// ),
|
||||||
|
/// FlatButton(
|
||||||
|
/// child: Text("DISMISS"),
|
||||||
|
/// onPressed: () {},
|
||||||
|
/// ),
|
||||||
|
/// ],
|
||||||
|
/// );
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
/// {@end-tool}
|
||||||
|
///
|
||||||
/// The [actions] will be placed beside the [content] if there is only one.
|
/// The [actions] will be placed beside the [content] if there is only one.
|
||||||
/// Otherwise, the [actions] will be placed below the [content]. Use
|
/// Otherwise, the [actions] will be placed below the [content]. Use
|
||||||
/// [forceActionsBelow] to override this behavior.
|
/// [forceActionsBelow] to override this behavior.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user