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 {
if
(
type
==
BottomNavigationBarType
.
shifting
)
{
iconColor
=
_color
;
}
else
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
iconColor
=
themeData
.
brightness
==
Brightness
.
light
?
themeData
.
primaryColor
:
themeData
.
accentColor
;
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
ColorScheme
colorScheme
=
theme
.
colorScheme
;
iconColor
=
theme
.
brightness
==
Brightness
.
light
?
colorScheme
.
primary
:
colorScheme
.
secondary
;
}
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 {
const
ListTile
(
title:
Text
(
'Top'
)),
ExpansionTile
(
title:
const
Text
(
'Sublist'
),
backgroundColor:
Theme
.
of
(
context
).
accentColor
.
withOpacity
(
0.025
),
backgroundColor:
Theme
.
of
(
context
).
colorScheme
.
secondary
.
withOpacity
(
0.025
),
children:
const
<
Widget
>[
ListTile
(
title:
Text
(
'One'
)),
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 {
child:
Text
(
'This is the modal bottom sheet. Slide down to dismiss.'
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Theme
.
of
(
context
).
accentColor
,
color:
Theme
.
of
(
context
).
colorScheme
.
secondary
,
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 {
@override
Widget
build
(
BuildContext
context
)
{
final
TabController
?
controller
=
DefaultTabController
.
of
(
context
);
final
Color
color
=
Theme
.
of
(
context
).
accentColor
;
final
Color
color
=
Theme
.
of
(
context
).
colorScheme
.
secondary
;
return
SafeArea
(
top:
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> {
child:
Text
(
'This is a Material persistent bottom sheet. Drag downwards to dismiss it.'
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
themeData
.
accentColor
,
color:
themeData
.
colorScheme
.
secondary
,
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
@override
Widget
build
(
BuildContext
context
)
{
final
Color
iconColor
=
Theme
.
of
(
context
).
accentColor
;
final
Color
iconColor
=
Theme
.
of
(
context
).
colorScheme
.
secondary
;
return
Scaffold
(
appBar:
AppBar
(
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> {
valueIndicatorColor:
Colors
.
deepPurpleAccent
,
thumbShape:
_CustomThumbShape
(),
valueIndicatorShape:
_CustomValueIndicatorShape
(),
valueIndicatorTextStyle:
theme
.
accentT
extTheme
.
bodyText1
!.
copyWith
(
color:
theme
.
colorScheme
.
onSurface
),
valueIndicatorTextStyle:
theme
.
t
extTheme
.
bodyText1
!.
copyWith
(
color:
theme
.
colorScheme
.
onSurface
),
),
child:
Slider
(
value:
_discreteCustomValue
,
...
...
dev/integration_tests/flutter_gallery/lib/demo/pesto_demo.dart
View file @
87c40326
...
...
@@ -25,7 +25,6 @@ final Set<Recipe?> _favoriteRecipes = <Recipe?>{};
final
ThemeData
_kTheme
=
ThemeData
(
brightness:
Brightness
.
light
,
primarySwatch:
Colors
.
teal
,
accentColor:
Colors
.
redAccent
,
);
class
PestoHome
extends
StatelessWidget
{
...
...
@@ -84,12 +83,13 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
data:
_kTheme
.
copyWith
(
platform:
Theme
.
of
(
context
).
platform
),
child:
Scaffold
(
floatingActionButton:
FloatingActionButton
(
child:
const
Icon
(
Icons
.
edit
)
,
backgroundColor:
Colors
.
redAccent
,
onPressed:
()
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'Not supported.'
),
));
},
child:
const
Icon
(
Icons
.
edit
),
),
body:
CustomScrollView
(
semanticChildCount:
widget
.
recipes
!.
length
,
...
...
@@ -392,8 +392,9 @@ class _RecipePageState extends State<RecipePage> {
Positioned
(
right:
16.0
,
child:
FloatingActionButton
(
child:
Icon
(
isFavorite
?
Icons
.
favorite
:
Icons
.
favorite_border
)
,
backgroundColor:
Colors
.
redAccent
,
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() {
final
ThemeData
base
=
ThemeData
.
light
();
return
base
.
copyWith
(
colorScheme:
kShrineColorScheme
,
accentColor:
kShrineBrown900
,
primaryColor:
kShrinePink100
,
buttonColor:
kShrinePink100
,
scaffoldBackgroundColor:
kShrineBackgroundWhite
,
cardColor:
kShrineBackgroundWhite
,
errorColor:
kShrineErrorRed
,
buttonTheme:
const
ButtonThemeData
(
colorScheme:
kShrineColorScheme
,
textTheme:
ButtonTextTheme
.
normal
,
),
primaryIconTheme:
_customIconTheme
(
base
.
iconTheme
),
inputDecorationTheme:
const
InputDecorationTheme
(
border:
CutCornersBorder
()),
textTheme:
_buildShrineTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildShrineTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildShrineTextTheme
(
base
.
accentTextTheme
),
iconTheme:
_customIconTheme
(
base
.
iconTheme
),
);
}
...
...
dev/integration_tests/flutter_gallery/lib/gallery/about.dart
View file @
87c40326
...
...
@@ -35,7 +35,7 @@ class _LinkTextSpan extends TextSpan {
void
showGalleryAboutDialog
(
BuildContext
context
)
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
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
(
context:
context
,
...
...
dev/integration_tests/flutter_gallery/lib/gallery/themes.dart
View file @
87c40326
...
...
@@ -25,14 +25,12 @@ ThemeData _buildDarkTheme() {
);
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
dark
,
accentColorBrightness:
Brightness
.
dark
,
colorScheme:
colorScheme
,
primaryColor:
primaryColor
,
primaryColorDark:
const
Color
(
0xFF0050a0
),
primaryColorLight:
secondaryColor
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF6997DF
),
accentColor:
secondaryColor
,
canvasColor:
const
Color
(
0xFF202124
),
scaffoldBackgroundColor:
const
Color
(
0xFF202124
),
backgroundColor:
const
Color
(
0xFF202124
),
...
...
@@ -41,7 +39,6 @@ ThemeData _buildDarkTheme() {
return
base
.
copyWith
(
textTheme:
_buildTextTheme
(
base
.
textTheme
),
primaryTextTheme:
_buildTextTheme
(
base
.
primaryTextTheme
),
accentTextTheme:
_buildTextTheme
(
base
.
accentTextTheme
),
);
}
...
...
@@ -54,14 +51,12 @@ ThemeData _buildLightTheme() {
);
final
ThemeData
base
=
ThemeData
(
brightness:
Brightness
.
light
,
accentColorBrightness:
Brightness
.
dark
,
colorScheme:
colorScheme
,
primaryColor:
primaryColor
,
indicatorColor:
Colors
.
white
,
toggleableActiveColor:
const
Color
(
0xFF1E88E5
),
splashColor:
Colors
.
white24
,
splashFactory:
InkRipple
.
splashFactory
,
accentColor:
secondaryColor
,
canvasColor:
Colors
.
white
,
scaffoldBackgroundColor:
Colors
.
white
,
backgroundColor:
Colors
.
white
,
...
...
@@ -70,6 +65,5 @@ ThemeData _buildLightTheme() {
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