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
1e76c1f8
Commit
1e76c1f8
authored
Nov 18, 2016
by
Hans Muller
Committed by
GitHub
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added backgroundColor to SnackBar (#6929)
parent
5ceaaeef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
snack_bar.dart
packages/flutter/lib/src/material/snack_bar.dart
+6
-1
No files found.
packages/flutter/lib/src/material/snack_bar.dart
View file @
1e76c1f8
...
...
@@ -113,6 +113,7 @@ class SnackBar extends StatelessWidget {
SnackBar
({
Key
key
,
this
.
content
,
this
.
backgroundColor
,
this
.
action
,
this
.
duration
:
_kSnackBarDisplayDuration
,
this
.
animation
...
...
@@ -125,6 +126,9 @@ class SnackBar extends StatelessWidget {
/// Typically a [Text] widget.
final
Widget
content
;
/// The Snackbar's background color. By default the color is dark grey.
final
Color
backgroundColor
;
/// (optional) An action that the user can take based on the snack bar.
///
/// For example, the snack bar might let the user undo the operation that
...
...
@@ -201,7 +205,7 @@ class SnackBar extends StatelessWidget {
},
child:
new
Material
(
elevation:
6
,
color:
_kSnackBackground
,
color:
backgroundColor
??
_kSnackBackground
,
child:
new
Theme
(
data:
darkTheme
,
child:
new
FadeTransition
(
...
...
@@ -238,6 +242,7 @@ class SnackBar extends StatelessWidget {
return
new
SnackBar
(
key:
key
??
fallbackKey
,
content:
content
,
backgroundColor:
backgroundColor
,
action:
action
,
duration:
duration
,
animation:
newAnimation
...
...
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