Unverified Commit 8960baa4 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Updated the MaterialBanner example, NNBD, etc (#72477)

parent 9ff4326e
...@@ -18,25 +18,29 @@ import 'theme.dart'; ...@@ -18,25 +18,29 @@ 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_no_null_safety} /// {@tool dartpad --template=stateless_widget_material}
///
/// ```dart /// ```dart
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// return MaterialBanner( /// return Scaffold(
/// padding: const EdgeInsets.all(20), /// appBar: AppBar(
/// content: Text("Hey, I am a Material Banner"), /// title: const Text('The MaterialBanner is below'),
/// leading: Icon(Icons.agriculture_outlined), /// ),
/// backgroundColor: Colors.grey[300], /// body: const MaterialBanner(
/// actions: <Widget>[ /// padding: EdgeInsets.all(20),
/// FlatButton( /// content: Text('Hello, I am a Material Banner'),
/// child: Text("OPEN"), /// leading: Icon(Icons.agriculture_outlined),
/// onPressed: () {}, /// backgroundColor: Color(0xFFE0E0E0),
/// ), /// actions: <Widget>[
/// FlatButton( /// TextButton(
/// child: Text("DISMISS"), /// child: Text('OPEN'),
/// onPressed: () {}, /// onPressed: null,
/// ), /// ),
/// ], /// TextButton(
/// child: Text('DISMISS'),
/// onPressed: null,
/// ),
/// ],
/// ),
/// ); /// );
/// } /// }
/// ``` /// ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment