Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8960baa4
Unverified
Commit
8960baa4
authored
Dec 17, 2020
by
Hans Muller
Committed by
GitHub
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the MaterialBanner example, NNBD, etc (#72477)
parent
9ff4326e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
banner.dart
packages/flutter/lib/src/material/banner.dart
+21
-17
No files found.
packages/flutter/lib/src/material/banner.dart
View file @
8960baa4
...
...
@@ -18,25 +18,29 @@ import 'theme.dart';
/// They are persistent and non-modal, allowing the user to either ignore them or
/// interact with them at any time.
///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety}
///
/// {@tool dartpad --template=stateless_widget_material}
/// ```dart
/// Widget build(BuildContext context) {
/// return MaterialBanner(
/// padding: const EdgeInsets.all(20),
/// content: Text("Hey, I am a Material Banner"),
/// leading: Icon(Icons.agriculture_outlined),
/// backgroundColor: Colors.grey[300],
/// actions: <Widget>[
/// FlatButton(
/// child: Text("OPEN"),
/// onPressed: () {},
/// ),
/// FlatButton(
/// child: Text("DISMISS"),
/// onPressed: () {},
/// ),
/// ],
/// return Scaffold(
/// appBar: AppBar(
/// title: const Text('The MaterialBanner is below'),
/// ),
/// body: const MaterialBanner(
/// padding: EdgeInsets.all(20),
/// content: Text('Hello, I am a Material Banner'),
/// leading: Icon(Icons.agriculture_outlined),
/// backgroundColor: Color(0xFFE0E0E0),
/// actions: <Widget>[
/// TextButton(
/// child: Text('OPEN'),
/// onPressed: null,
/// ),
/// TextButton(
/// child: Text('DISMISS'),
/// onPressed: null,
/// ),
/// ],
/// ),
/// );
/// }
/// ```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment