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
08496712
Unverified
Commit
08496712
authored
May 18, 2022
by
Greg Spencer
Committed by
GitHub
May 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorder Theme fields and arguments to be consistently alphabetical within sections. (#104011)
parent
851c9521
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
487 additions
and
443 deletions
+487
-443
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+417
-383
theme_data_test.dart
packages/flutter/test/material/theme_data_test.dart
+70
-60
No files found.
packages/flutter/lib/src/material/theme_data.dart
View file @
08496712
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/theme_data_test.dart
View file @
08496712
...
...
@@ -616,86 +616,96 @@ void main() {
);
final
ThemeData
theme
=
ThemeData
.
raw
(
// For the sanity of the reader, make sure these properties are in the same
// order everywhere that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
applyElevationOverlayColor:
false
,
cupertinoOverrideTheme:
null
,
extensions:
const
<
Object
,
ThemeExtension
<
dynamic
>>{},
inputDecorationTheme:
ThemeData
.
dark
().
inputDecorationTheme
.
copyWith
(
border:
const
OutlineInputBorder
()),
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
pageTransitionsTheme:
pageTransitionTheme
,
platform:
TargetPlatform
.
iOS
,
scrollbarTheme:
const
ScrollbarThemeData
(
radius:
Radius
.
circular
(
10.0
)),
splashFactory:
InkRipple
.
splashFactory
,
useMaterial3:
false
,
visualDensity:
VisualDensity
.
standard
,
primaryColor:
Colors
.
black
,
primaryColorBrightness:
Brightness
.
dark
,
primaryColorLight:
Colors
.
black
,
primaryColorDark:
Colors
.
black
,
accentColor:
Colors
.
black
,
accentColorBrightness:
Brightness
.
dark
,
canvasColor:
Colors
.
black
,
shadowColor:
Colors
.
black
,
scaffoldBackgroundColor:
Colors
.
black
,
// COLOR
backgroundColor:
Colors
.
black
,
bottomAppBarColor:
Colors
.
black
,
canvasColor:
Colors
.
black
,
cardColor:
Colors
.
black
,
colorScheme:
const
ColorScheme
.
light
(),
dialogBackgroundColor:
Colors
.
black
,
disabledColor:
Colors
.
black
,
dividerColor:
Colors
.
black
,
errorColor:
Colors
.
black
,
focusColor:
Colors
.
black
,
hoverColor:
Colors
.
black
,
highlightColor:
Colors
.
black
,
splashColor:
Colors
.
black
,
splashFactory:
InkRipple
.
splashFactory
,
useMaterial3:
false
,
selectedRowColor:
Colors
.
black
,
unselectedWidgetColor:
Colors
.
black
,
disabledColor:
Colors
.
black
,
buttonTheme:
const
ButtonThemeData
(
colorScheme:
ColorScheme
.
dark
()),
toggleButtonsTheme:
const
ToggleButtonsThemeData
(
textStyle:
TextStyle
(
color:
Colors
.
black
)),
buttonColor:
Colors
.
black
,
secondaryHeaderColor:
Colors
.
black
,
backgroundColor:
Colors
.
black
,
dialogBackgroundColor:
Colors
.
black
,
indicatorColor:
Colors
.
black
,
hintColor:
Colors
.
black
,
errorColor:
Colors
.
black
,
hoverColor:
Colors
.
black
,
indicatorColor:
Colors
.
black
,
primaryColor:
Colors
.
black
,
primaryColorDark:
Colors
.
black
,
primaryColorLight:
Colors
.
black
,
scaffoldBackgroundColor:
Colors
.
black
,
secondaryHeaderColor:
Colors
.
black
,
selectedRowColor:
Colors
.
black
,
shadowColor:
Colors
.
black
,
splashColor:
Colors
.
black
,
toggleableActiveColor:
Colors
.
black
,
textTheme:
ThemeData
.
dark
().
textTheme
,
primaryTextTheme:
ThemeData
.
dark
().
textTheme
,
accentTextTheme:
ThemeData
.
dark
().
textTheme
,
inputDecorationTheme:
ThemeData
.
dark
().
inputDecorationTheme
.
copyWith
(
border:
const
OutlineInputBorder
()),
unselectedWidgetColor:
Colors
.
black
,
// TYPOGRAPHY & ICONOGRAPHY
iconTheme:
ThemeData
.
dark
().
iconTheme
,
primaryIconTheme:
ThemeData
.
dark
().
iconTheme
,
accentIconTheme:
ThemeData
.
dark
().
iconTheme
,
sliderTheme:
sliderTheme
,
tabBarTheme:
const
TabBarTheme
(
labelColor:
Colors
.
black
),
tooltipTheme:
const
TooltipThemeData
(
height:
100
),
expansionTileTheme:
const
ExpansionTileThemeData
(
backgroundColor:
Colors
.
black
),
cardTheme:
const
CardTheme
(
color:
Colors
.
black
),
chipTheme:
chipTheme
,
platform:
TargetPlatform
.
iOS
,
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
applyElevationOverlayColor:
false
,
pageTransitionsTheme:
pageTransitionTheme
,
primaryTextTheme:
ThemeData
.
dark
().
textTheme
,
textTheme:
ThemeData
.
dark
().
textTheme
,
typography:
Typography
.
material2018
(),
// COMPONENT THEMES
appBarTheme:
const
AppBarTheme
(
backgroundColor:
Colors
.
black
),
scrollbarTheme:
const
ScrollbarThemeData
(
radius:
Radius
.
circular
(
10.0
)
),
bannerTheme:
const
MaterialBannerThemeData
(
backgroundColor:
Colors
.
black
),
bottomAppBarTheme:
const
BottomAppBarTheme
(
color:
Colors
.
black
),
colorScheme:
const
ColorScheme
.
light
(),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
fixed
),
bottomSheetTheme:
const
BottomSheetThemeData
(
backgroundColor:
Colors
.
black
),
buttonBarTheme:
const
ButtonBarThemeData
(
alignment:
MainAxisAlignment
.
start
),
buttonTheme:
const
ButtonThemeData
(
colorScheme:
ColorScheme
.
dark
()),
cardTheme:
const
CardTheme
(
color:
Colors
.
black
),
checkboxTheme:
const
CheckboxThemeData
(),
chipTheme:
chipTheme
,
dataTableTheme:
const
DataTableThemeData
(),
dialogTheme:
const
DialogTheme
(
backgroundColor:
Colors
.
black
),
dividerTheme:
const
DividerThemeData
(
color:
Colors
.
black
),
drawerTheme:
const
DrawerThemeData
(),
elevatedButtonTheme:
ElevatedButtonThemeData
(
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
green
)),
expansionTileTheme:
const
ExpansionTileThemeData
(
backgroundColor:
Colors
.
black
),
floatingActionButtonTheme:
const
FloatingActionButtonThemeData
(
backgroundColor:
Colors
.
black
),
listTileTheme:
const
ListTileThemeData
(),
navigationBarTheme:
const
NavigationBarThemeData
(
backgroundColor:
Colors
.
black
),
navigationRailTheme:
const
NavigationRailThemeData
(
backgroundColor:
Colors
.
black
),
typography:
Typography
.
material2018
(),
cupertinoOverrideTheme:
null
,
snackBarTheme:
const
SnackBarThemeData
(
backgroundColor:
Colors
.
black
),
bottomSheetTheme:
const
BottomSheetThemeData
(
backgroundColor:
Colors
.
black
),
popupMenuTheme:
const
PopupMenuThemeData
(
color:
Colors
.
black
),
bannerTheme:
const
MaterialBannerThemeData
(
backgroundColor:
Colors
.
black
),
dividerTheme:
const
DividerThemeData
(
color:
Colors
.
black
),
buttonBarTheme:
const
ButtonBarThemeData
(
alignment:
MainAxisAlignment
.
start
),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
fixed
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
black
),
textButtonTheme:
TextButtonThemeData
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
red
)),
elevatedButtonTheme:
ElevatedButtonThemeData
(
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
green
)),
outlinedButtonTheme:
OutlinedButtonThemeData
(
style:
OutlinedButton
.
styleFrom
(
primary:
Colors
.
blue
)),
textSelectionTheme:
const
TextSelectionThemeData
(
cursorColor:
Colors
.
black
),
dataTableTheme:
const
DataTableThemeData
(),
checkboxTheme:
const
CheckboxThemeData
(),
popupMenuTheme:
const
PopupMenuThemeData
(
color:
Colors
.
black
),
progressIndicatorTheme:
const
ProgressIndicatorThemeData
(),
radioTheme:
const
RadioThemeData
(),
sliderTheme:
sliderTheme
,
snackBarTheme:
const
SnackBarThemeData
(
backgroundColor:
Colors
.
black
),
switchTheme:
const
SwitchThemeData
(),
progressIndicatorTheme:
const
ProgressIndicatorThemeData
(),
drawerTheme:
const
DrawerThemeData
(),
listTileTheme:
const
ListTileThemeData
(),
tabBarTheme:
const
TabBarTheme
(
labelColor:
Colors
.
black
),
textButtonTheme:
TextButtonThemeData
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
red
)),
textSelectionTheme:
const
TextSelectionThemeData
(
cursorColor:
Colors
.
black
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
black
),
toggleButtonsTheme:
const
ToggleButtonsThemeData
(
textStyle:
TextStyle
(
color:
Colors
.
black
)),
tooltipTheme:
const
TooltipThemeData
(
height:
100
),
// DEPRECATED (newest deprecations at the bottom)
accentColor:
Colors
.
black
,
accentColorBrightness:
Brightness
.
dark
,
accentTextTheme:
ThemeData
.
dark
().
textTheme
,
accentIconTheme:
ThemeData
.
dark
().
iconTheme
,
buttonColor:
Colors
.
black
,
fixTextFieldOutlineLabel:
false
,
extensions:
const
<
Object
,
ThemeExtension
<
dynamic
>>{}
,
primaryColorBrightness:
Brightness
.
dark
,
);
final
SliderThemeData
otherSliderTheme
=
SliderThemeData
.
fromPrimaryColors
(
...
...
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