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
3a6f6c82
Commit
3a6f6c82
authored
Aug 23, 2016
by
Hans Muller
Committed by
GitHub
Aug 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gallery app preview banner (#5554)
parent
44e1f646
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
app.dart
examples/flutter_gallery/lib/gallery/app.dart
+26
-8
No files found.
examples/flutter_gallery/lib/gallery/app.dart
View file @
3a6f6c82
...
...
@@ -37,19 +37,37 @@ class GalleryAppState extends State<GalleryApp> {
@override
Widget
build
(
BuildContext
context
)
{
return
new
MaterialApp
(
title:
'Flutter Gallery'
,
theme:
_useLightTheme
?
_kGalleryLightTheme
:
_kGalleryDarkTheme
,
showPerformanceOverlay:
_showPerformanceOverlay
,
routes:
_kRoutes
,
home:
new
GalleryHome
(
// In checked mode, show the default "slow mode" banner, otherwise show
// the "preview" banner.
bool
showPreviewBanner
=
true
;
assert
(()
{
showPreviewBanner
=
false
;
return
true
;
});
Widget
home
=
new
GalleryHome
(
useLightTheme:
_useLightTheme
,
onThemeChanged:
(
bool
value
)
{
setState
(()
{
_useLightTheme
=
value
;
});
},
showPerformanceOverlay:
_showPerformanceOverlay
,
onShowPerformanceOverlayChanged:
(
bool
value
)
{
setState
(()
{
_showPerformanceOverlay
=
value
;
});
},
timeDilation:
timeDilation
,
onTimeDilationChanged:
(
double
value
)
{
setState
(()
{
timeDilation
=
value
;
});
}
)
);
if
(
showPreviewBanner
)
{
home
=
new
Banner
(
message:
'PREVIEW'
,
location:
BannerLocation
.
topRight
,
child:
home
);
}
return
new
MaterialApp
(
title:
'Flutter Gallery'
,
theme:
_useLightTheme
?
_kGalleryLightTheme
:
_kGalleryDarkTheme
,
showPerformanceOverlay:
_showPerformanceOverlay
,
routes:
_kRoutes
,
home:
home
);
}
}
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