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
87c40326
Unverified
Commit
87c40326
authored
Mar 17, 2021
by
Hans Muller
Committed by
GitHub
Mar 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed accentColor and accentTextTheme dependencies from flutter_gallery (#78378)
parent
2834f44d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
27 deletions
+16
-27
bottom_navigation_demo.dart
...ter_gallery/lib/demo/material/bottom_navigation_demo.dart
+5
-4
expansion_tile_list_demo.dart
...r_gallery/lib/demo/material/expansion_tile_list_demo.dart
+1
-1
modal_bottom_sheet_demo.dart
...er_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
+1
-1
page_selector_demo.dart
...flutter_gallery/lib/demo/material/page_selector_demo.dart
+1
-1
persistent_bottom_sheet_demo.dart
...llery/lib/demo/material/persistent_bottom_sheet_demo.dart
+1
-1
scrollable_tabs_demo.dart
...utter_gallery/lib/demo/material/scrollable_tabs_demo.dart
+1
-1
slider_demo.dart
..._tests/flutter_gallery/lib/demo/material/slider_demo.dart
+1
-1
pesto_demo.dart
...ntegration_tests/flutter_gallery/lib/demo/pesto_demo.dart
+4
-3
app.dart
...ntegration_tests/flutter_gallery/lib/demo/shrine/app.dart
+0
-7
about.dart
dev/integration_tests/flutter_gallery/lib/gallery/about.dart
+1
-1
themes.dart
...integration_tests/flutter_gallery/lib/gallery/themes.dart
+0
-6
No files found.
dev/integration_tests/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart
View file @
87c40326
...
@@ -43,10 +43,11 @@ class NavigationIconView {
...
@@ -43,10 +43,11 @@ class NavigationIconView {
if
(
type
==
BottomNavigationBarType
.
shifting
)
{
if
(
type
==
BottomNavigationBarType
.
shifting
)
{
iconColor
=
_color
;
iconColor
=
_color
;
}
else
{
}
else
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
final
ThemeData
theme
=
Theme
.
of
(
context
);
iconColor
=
themeData
.
brightness
==
Brightness
.
light
final
ColorScheme
colorScheme
=
theme
.
colorScheme
;
?
themeData
.
primaryColor
iconColor
=
theme
.
brightness
==
Brightness
.
light
:
themeData
.
accentColor
;
?
colorScheme
.
primary
:
colorScheme
.
secondary
;
}
}
return
FadeTransition
(
return
FadeTransition
(
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
View file @
87c40326
...
@@ -24,7 +24,7 @@ class ExpansionTileListDemo extends StatelessWidget {
...
@@ -24,7 +24,7 @@ class ExpansionTileListDemo extends StatelessWidget {
const
ListTile
(
title:
Text
(
'Top'
)),
const
ListTile
(
title:
Text
(
'Top'
)),
ExpansionTile
(
ExpansionTile
(
title:
const
Text
(
'Sublist'
),
title:
const
Text
(
'Sublist'
),
backgroundColor:
Theme
.
of
(
context
).
accentColor
.
withOpacity
(
0.025
),
backgroundColor:
Theme
.
of
(
context
).
colorScheme
.
secondary
.
withOpacity
(
0.025
),
children:
const
<
Widget
>[
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'One'
)),
ListTile
(
title:
Text
(
'One'
)),
ListTile
(
title:
Text
(
'Two'
)),
ListTile
(
title:
Text
(
'Two'
)),
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
View file @
87c40326
...
@@ -28,7 +28,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
...
@@ -28,7 +28,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
child:
Text
(
'This is the modal bottom sheet. Slide down to dismiss.'
,
child:
Text
(
'This is the modal bottom sheet. Slide down to dismiss.'
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
color:
Theme
.
of
(
context
).
accentColor
,
color:
Theme
.
of
(
context
).
colorScheme
.
secondary
,
fontSize:
24.0
,
fontSize:
24.0
,
),
),
),
),
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/page_selector_demo.dart
View file @
87c40326
...
@@ -20,7 +20,7 @@ class _PageSelector extends StatelessWidget {
...
@@ -20,7 +20,7 @@ class _PageSelector extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
TabController
?
controller
=
DefaultTabController
.
of
(
context
);
final
TabController
?
controller
=
DefaultTabController
.
of
(
context
);
final
Color
color
=
Theme
.
of
(
context
).
accentColor
;
final
Color
color
=
Theme
.
of
(
context
).
colorScheme
.
secondary
;
return
SafeArea
(
return
SafeArea
(
top:
false
,
top:
false
,
bottom:
false
,
bottom:
false
,
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart
View file @
87c40326
...
@@ -41,7 +41,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
...
@@ -41,7 +41,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
child:
Text
(
'This is a Material persistent bottom sheet. Drag downwards to dismiss it.'
,
child:
Text
(
'This is a Material persistent bottom sheet. Drag downwards to dismiss it.'
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
color:
themeData
.
accentColor
,
color:
themeData
.
colorScheme
.
secondary
,
fontSize:
24.0
,
fontSize:
24.0
,
),
),
),
),
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart
View file @
87c40326
...
@@ -123,7 +123,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
...
@@ -123,7 +123,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
Color
iconColor
=
Theme
.
of
(
context
).
accentColor
;
final
Color
iconColor
=
Theme
.
of
(
context
).
colorScheme
.
secondary
;
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'Scrollable tabs'
),
title:
const
Text
(
'Scrollable tabs'
),
...
...
dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart
View file @
87c40326
...
@@ -334,7 +334,7 @@ class _SlidersState extends State<_Sliders> {
...
@@ -334,7 +334,7 @@ class _SlidersState extends State<_Sliders> {
valueIndicatorColor:
Colors
.
deepPurpleAccent
,
valueIndicatorColor:
Colors
.
deepPurpleAccent
,
thumbShape:
_CustomThumbShape
(),
thumbShape:
_CustomThumbShape
(),
valueIndicatorShape:
_CustomValueIndicatorShape
(),
valueIndicatorShape:
_CustomValueIndicatorShape
(),
valueIndicatorTextStyle:
theme
.
accentT
extTheme
.
bodyText1
!.
copyWith
(
color:
theme
.
colorScheme
.
onSurface
),
valueIndicatorTextStyle:
theme
.
t
extTheme
.
bodyText1
!.
copyWith
(
color:
theme
.
colorScheme
.
onSurface
),
),
),
child:
Slider
(
child:
Slider
(
value:
_discreteCustomValue
,
value:
_discreteCustomValue
,
...
...
dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart
View file @
87c40326
...
@@ -25,7 +25,6 @@ final Set<Recipe?> _favoriteRecipes = <Recipe?>{};
...
@@ -25,7 +25,6 @@ final Set<Recipe?> _favoriteRecipes = <Recipe?>{};
final
ThemeData
_kTheme
=
ThemeData
(
final
ThemeData
_kTheme
=
ThemeData
(
brightness:
Brightness
.
light
,
brightness:
Brightness
.
light
,
primarySwatch:
Colors
.
teal
,
primarySwatch:
Colors
.
teal
,
accentColor:
Colors
.
redAccent
,
);
);
class
PestoHome
extends
StatelessWidget
{
class
PestoHome
extends
StatelessWidget
{
...
@@ -84,12 +83,13 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
...
@@ -84,12 +83,13 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
data:
_kTheme
.
copyWith
(
platform:
Theme
.
of
(
context
).
platform
),
data:
_kTheme
.
copyWith
(
platform:
Theme
.
of
(
context
).
platform
),
child:
Scaffold
(
child:
Scaffold
(
floatingActionButton:
FloatingActionButton
(
floatingActionButton:
FloatingActionButton
(
child:
const
Icon
(
Icons
.
edit
)
,
backgroundColor:
Colors
.
redAccent
,
onPressed:
()
{
onPressed:
()
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'Not supported.'
),
content:
Text
(
'Not supported.'
),
));
));
},
},
child:
const
Icon
(
Icons
.
edit
),
),
),
body:
CustomScrollView
(
body:
CustomScrollView
(
semanticChildCount:
widget
.
recipes
!.
length
,
semanticChildCount:
widget
.
recipes
!.
length
,
...
@@ -392,8 +392,9 @@ class _RecipePageState extends State<RecipePage> {
...
@@ -392,8 +392,9 @@ class _RecipePageState extends State<RecipePage> {
Positioned
(
Positioned
(
right:
16.0
,
right:
16.0
,
child:
FloatingActionButton
(
child:
FloatingActionButton
(
child:
Icon
(
isFavorite
?
Icons
.
favorite
:
Icons
.
favorite_border
)
,
backgroundColor:
Colors
.
redAccent
,
onPressed:
_toggleFavorite
,
onPressed:
_toggleFavorite
,
child:
Icon
(
isFavorite
?
Icons
.
favorite
:
Icons
.
favorite_border
),
),
),
),
),
],
],
...
...
dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart
View file @
87c40326
...
@@ -79,21 +79,14 @@ ThemeData _buildShrineTheme() {
...
@@ -79,21 +79,14 @@ ThemeData _buildShrineTheme() {
final
ThemeData
base
=
ThemeData
.
light
();
final
ThemeData
base
=
ThemeData
.
light
();
return
base
.
copyWith
(
return
base
.
copyWith
(
colorScheme:
kShrineColorScheme
,
colorScheme:
kShrineColorScheme
,
accentColor:
kShrineBrown900
,
primaryColor:
kShrinePink100
,
primaryColor:
kShrinePink100
,
buttonColor:
kShrinePink100
,
scaffoldBackgroundColor:
kShrineBackgroundWhite
,
scaffoldBackgroundColor:
kShrineBackgroundWhite
,
cardColor:
kShrineBackgroundWhite
,
cardColor:
kShrineBackgroundWhite
,
errorColor:
kShrineErrorRed
,
errorColor:
kShrineErrorRed
,
buttonTheme:
const
ButtonThemeData
(
colorScheme:
kShrineColorScheme
,
textTheme:
ButtonTextTheme
.
normal
,
),
primaryIconTheme:
_customIconTheme
(
base
.
iconTheme
),
primaryIconTheme:
_customIconTheme
(
base
.
iconTheme
),
inputDecorationTheme:
const
InputDecorationTheme
(
border:
CutCornersBorder
()),
inputDecorationTheme:
const
InputDecorationTheme
(
border:
CutCornersBorder
()),
textTheme:
_buildShrineTextTheme
(
base
.
textTheme
),
textTheme:
_buildShrineTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildShrineTextTheme
(
base
.
primaryTextTheme
),
primaryTextTheme:
_buildShrineTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildShrineTextTheme
(
base
.
accentTextTheme
),
iconTheme:
_customIconTheme
(
base
.
iconTheme
),
iconTheme:
_customIconTheme
(
base
.
iconTheme
),
);
);
}
}
...
...
dev/integration_tests/flutter_gallery/lib/gallery/about.dart
View file @
87c40326
...
@@ -35,7 +35,7 @@ class _LinkTextSpan extends TextSpan {
...
@@ -35,7 +35,7 @@ class _LinkTextSpan extends TextSpan {
void
showGalleryAboutDialog
(
BuildContext
context
)
{
void
showGalleryAboutDialog
(
BuildContext
context
)
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
final
ThemeData
themeData
=
Theme
.
of
(
context
);
final
TextStyle
?
aboutTextStyle
=
themeData
.
textTheme
.
bodyText1
;
final
TextStyle
?
aboutTextStyle
=
themeData
.
textTheme
.
bodyText1
;
final
TextStyle
linkStyle
=
themeData
.
textTheme
.
bodyText1
!.
copyWith
(
color:
themeData
.
accentColor
);
final
TextStyle
linkStyle
=
themeData
.
textTheme
.
bodyText1
!.
copyWith
(
color:
themeData
.
colorScheme
.
primary
);
showAboutDialog
(
showAboutDialog
(
context:
context
,
context:
context
,
...
...
dev/integration_tests/flutter_gallery/lib/gallery/themes.dart
View file @
87c40326
...
@@ -25,14 +25,12 @@ ThemeData _buildDarkTheme() {
...
@@ -25,14 +25,12 @@ ThemeData _buildDarkTheme() {
);
);
final
ThemeData
base
=
ThemeData
(
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
dark
,
brightness:
Brightness
.
dark
,
accentColorBrightness:
Brightness
.
dark
,
colorScheme:
colorScheme
,
colorScheme:
colorScheme
,
primaryColor:
primaryColor
,
primaryColor:
primaryColor
,
primaryColorDark:
const
Color
(
0xFF0050a0
),
primaryColorDark:
const
Color
(
0xFF0050a0
),
primaryColorLight:
secondaryColor
,
primaryColorLight:
secondaryColor
,
indicatorColor:
Colors
.
white
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF6997DF
),
toggleableActiveColor:
const
Color
(
0xFF6997DF
),
accentColor:
secondaryColor
,
canvasColor:
const
Color
(
0xFF202124
),
canvasColor:
const
Color
(
0xFF202124
),
scaffoldBackgroundColor:
const
Color
(
0xFF202124
),
scaffoldBackgroundColor:
const
Color
(
0xFF202124
),
backgroundColor:
const
Color
(
0xFF202124
),
backgroundColor:
const
Color
(
0xFF202124
),
...
@@ -41,7 +39,6 @@ ThemeData _buildDarkTheme() {
...
@@ -41,7 +39,6 @@ ThemeData _buildDarkTheme() {
return
base
.
copyWith
(
return
base
.
copyWith
(
textTheme:
_buildTextTheme
(
base
.
textTheme
),
textTheme:
_buildTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildTextTheme
(
base
.
accentTextTheme
),
);
);
}
}
...
@@ -54,14 +51,12 @@ ThemeData _buildLightTheme() {
...
@@ -54,14 +51,12 @@ ThemeData _buildLightTheme() {
);
);
final
ThemeData
base
=
ThemeData
(
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
light
,
brightness:
Brightness
.
light
,
accentColorBrightness:
Brightness
.
dark
,
colorScheme:
colorScheme
,
colorScheme:
colorScheme
,
primaryColor:
primaryColor
,
primaryColor:
primaryColor
,
indicatorColor:
Colors
.
white
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF1E88E5
),
toggleableActiveColor:
const
Color
(
0xFF1E88E5
),
splashColor:
Colors
.
white24
,
splashColor:
Colors
.
white24
,
splashFactory:
InkRipple
.
splashFactory
,
splashFactory:
InkRipple
.
splashFactory
,
accentColor:
secondaryColor
,
canvasColor:
Colors
.
white
,
canvasColor:
Colors
.
white
,
scaffoldBackgroundColor:
Colors
.
white
,
scaffoldBackgroundColor:
Colors
.
white
,
backgroundColor:
Colors
.
white
,
backgroundColor:
Colors
.
white
,
...
@@ -70,6 +65,5 @@ ThemeData _buildLightTheme() {
...
@@ -70,6 +65,5 @@ ThemeData _buildLightTheme() {
return
base
.
copyWith
(
return
base
.
copyWith
(
textTheme:
_buildTextTheme
(
base
.
textTheme
),
textTheme:
_buildTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
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