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
2fd0728c
Unverified
Commit
2fd0728c
authored
Feb 28, 2019
by
Hans Muller
Committed by
GitHub
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated gallery light and dark themes (#28619)
parent
47c835fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
themes.dart
examples/flutter_gallery/lib/gallery/themes.dart
+14
-4
No files found.
examples/flutter_gallery/lib/gallery/themes.dart
View file @
2fd0728c
...
...
@@ -25,15 +25,19 @@ TextTheme _buildTextTheme(TextTheme base) {
ThemeData
_buildDarkTheme
(
)
{
const
Color
primaryColor
=
Color
(
0xFF0175c2
);
const
Color
secondaryColor
=
Color
(
0xFF13B9FD
);
final
ThemeData
base
=
ThemeData
.
dark
();
final
ColorScheme
colorScheme
=
const
ColorScheme
.
dark
().
copyWith
(
primary:
primaryColor
,
secondary:
secondaryColor
,
);
return
base
.
copyWith
(
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
dark
,
accentColorBrightness:
Brightness
.
dark
,
primaryColor:
primaryColor
,
primaryColorDark:
const
Color
(
0xFF0050a0
),
primaryColorLight:
secondaryColor
,
buttonColor:
primaryColor
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF6997DF
),
accentColor:
secondaryColor
,
canvasColor:
const
Color
(
0xFF202124
),
scaffoldBackgroundColor:
const
Color
(
0xFF202124
),
...
...
@@ -43,6 +47,8 @@ ThemeData _buildDarkTheme() {
colorScheme:
colorScheme
,
textTheme:
ButtonTextTheme
.
primary
,
),
);
return
base
.
copyWith
(
textTheme:
_buildTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildTextTheme
(
base
.
accentTextTheme
),
...
...
@@ -56,12 +62,14 @@ ThemeData _buildLightTheme() {
primary:
primaryColor
,
secondary:
secondaryColor
,
);
final
ThemeData
base
=
ThemeData
.
light
();
return
base
.
copyWith
(
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
light
,
accentColorBrightness:
Brightness
.
dark
,
colorScheme:
colorScheme
,
primaryColor:
primaryColor
,
buttonColor:
primaryColor
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF1E88E5
),
splashColor:
Colors
.
white24
,
splashFactory:
InkRipple
.
splashFactory
,
accentColor:
secondaryColor
,
...
...
@@ -73,6 +81,8 @@ ThemeData _buildLightTheme() {
colorScheme:
colorScheme
,
textTheme:
ButtonTextTheme
.
primary
,
),
);
return
base
.
copyWith
(
textTheme:
_buildTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildTextTheme
(
base
.
accentTextTheme
),
...
...
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