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
Show 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
...
@@ -267,6 +267,11 @@ class ThemeData with Diagnosticable {
...
@@ -267,6 +267,11 @@ class ThemeData with Diagnosticable {
/// * [ThemeData.dark], which creates dark theme with a teal secondary [ColorScheme] color.
/// * [ThemeData.dark], which creates dark theme with a teal secondary [ColorScheme] color.
/// * [ColorScheme.fromSeed], which is used to create a [ColorScheme] from a seed color.
/// * [ColorScheme.fromSeed], which is used to create a [ColorScheme] from a seed color.
factory
ThemeData
({
factory
ThemeData
({
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
bool
?
applyElevationOverlayColor
,
bool
?
applyElevationOverlayColor
,
NoDefaultCupertinoThemeData
?
cupertinoOverrideTheme
,
NoDefaultCupertinoThemeData
?
cupertinoOverrideTheme
,
...
@@ -277,46 +282,46 @@ class ThemeData with Diagnosticable {
...
@@ -277,46 +282,46 @@ class ThemeData with Diagnosticable {
TargetPlatform
?
platform
,
TargetPlatform
?
platform
,
ScrollbarThemeData
?
scrollbarTheme
,
ScrollbarThemeData
?
scrollbarTheme
,
InteractiveInkFeatureFactory
?
splashFactory
,
InteractiveInkFeatureFactory
?
splashFactory
,
VisualDensity
?
visualDensity
,
bool
?
useMaterial3
,
bool
?
useMaterial3
,
VisualDensity
?
visualDensity
,
// COLOR
// COLOR
// [colorScheme] is the preferred way to configure colors. The other color
// [colorScheme] is the preferred way to configure colors. The other color
// properties (as well as primaryColorBrightness, and primarySwatch)
// properties (as well as primaryColorBrightness, and primarySwatch)
// will gradually be phased out, see https://github.com/flutter/flutter/issues/91772.
// will gradually be phased out, see https://github.com/flutter/flutter/issues/91772.
Color
Scheme
?
colorScheme
,
Color
?
backgroundColor
,
Color
?
colorSchemeSeed
,
Color
?
bottomAppBarColor
,
Brightness
?
brightness
,
Brightness
?
brightness
,
MaterialColor
?
primarySwatch
,
Color
?
primaryColor
,
Color
?
primaryColorLight
,
Color
?
primaryColorDark
,
Color
?
focusColor
,
Color
?
hoverColor
,
Color
?
shadowColor
,
Color
?
canvasColor
,
Color
?
canvasColor
,
Color
?
scaffoldBackgroundColor
,
Color
?
bottomAppBarColor
,
Color
?
cardColor
,
Color
?
cardColor
,
ColorScheme
?
colorScheme
,
Color
?
colorSchemeSeed
,
Color
?
dialogBackgroundColor
,
Color
?
disabledColor
,
Color
?
dividerColor
,
Color
?
dividerColor
,
Color
?
errorColor
,
Color
?
focusColor
,
Color
?
highlightColor
,
Color
?
highlightColor
,
Color
?
splashColor
,
Color
?
selectedRowColor
,
Color
?
unselectedWidgetColor
,
Color
?
disabledColor
,
Color
?
secondaryHeaderColor
,
Color
?
backgroundColor
,
Color
?
dialogBackgroundColor
,
Color
?
indicatorColor
,
Color
?
hintColor
,
Color
?
hintColor
,
Color
?
errorColor
,
Color
?
hoverColor
,
Color
?
indicatorColor
,
Color
?
primaryColor
,
Color
?
primaryColorDark
,
Color
?
primaryColorLight
,
MaterialColor
?
primarySwatch
,
Color
?
scaffoldBackgroundColor
,
Color
?
secondaryHeaderColor
,
Color
?
selectedRowColor
,
Color
?
shadowColor
,
Color
?
splashColor
,
Color
?
toggleableActiveColor
,
Color
?
toggleableActiveColor
,
Color
?
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
String
?
fontFamily
,
String
?
fontFamily
,
Typography
?
typography
,
TextTheme
?
textTheme
,
TextTheme
?
primaryTextTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
primaryIconTheme
,
IconThemeData
?
primaryIconTheme
,
TextTheme
?
primaryTextTheme
,
TextTheme
?
textTheme
,
Typography
?
typography
,
// COMPONENT THEMES
// COMPONENT THEMES
AppBarTheme
?
appBarTheme
,
AppBarTheme
?
appBarTheme
,
MaterialBannerThemeData
?
bannerTheme
,
MaterialBannerThemeData
?
bannerTheme
,
...
@@ -333,6 +338,7 @@ class ThemeData with Diagnosticable {
...
@@ -333,6 +338,7 @@ class ThemeData with Diagnosticable {
DividerThemeData
?
dividerTheme
,
DividerThemeData
?
dividerTheme
,
DrawerThemeData
?
drawerTheme
,
DrawerThemeData
?
drawerTheme
,
ElevatedButtonThemeData
?
elevatedButtonTheme
,
ElevatedButtonThemeData
?
elevatedButtonTheme
,
ExpansionTileThemeData
?
expansionTileTheme
,
FloatingActionButtonThemeData
?
floatingActionButtonTheme
,
FloatingActionButtonThemeData
?
floatingActionButtonTheme
,
ListTileThemeData
?
listTileTheme
,
ListTileThemeData
?
listTileTheme
,
NavigationBarThemeData
?
navigationBarTheme
,
NavigationBarThemeData
?
navigationBarTheme
,
...
@@ -350,7 +356,6 @@ class ThemeData with Diagnosticable {
...
@@ -350,7 +356,6 @@ class ThemeData with Diagnosticable {
TimePickerThemeData
?
timePickerTheme
,
TimePickerThemeData
?
timePickerTheme
,
ToggleButtonsThemeData
?
toggleButtonsTheme
,
ToggleButtonsThemeData
?
toggleButtonsTheme
,
TooltipThemeData
?
tooltipTheme
,
TooltipThemeData
?
tooltipTheme
,
ExpansionTileThemeData
?
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
@Deprecated
(
@Deprecated
(
'Use colorScheme.secondary instead. '
'Use colorScheme.secondary instead. '
...
@@ -569,6 +574,11 @@ class ThemeData with Diagnosticable {
...
@@ -569,6 +574,11 @@ class ThemeData with Diagnosticable {
primaryColorBrightness
=
estimatedPrimaryColorBrightness
;
primaryColorBrightness
=
estimatedPrimaryColorBrightness
;
return
ThemeData
.
raw
(
return
ThemeData
.
raw
(
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
applyElevationOverlayColor:
applyElevationOverlayColor
,
applyElevationOverlayColor:
applyElevationOverlayColor
,
cupertinoOverrideTheme:
cupertinoOverrideTheme
,
cupertinoOverrideTheme:
cupertinoOverrideTheme
,
...
@@ -579,38 +589,38 @@ class ThemeData with Diagnosticable {
...
@@ -579,38 +589,38 @@ class ThemeData with Diagnosticable {
platform:
platform
,
platform:
platform
,
scrollbarTheme:
scrollbarTheme
,
scrollbarTheme:
scrollbarTheme
,
splashFactory:
splashFactory
,
splashFactory:
splashFactory
,
visualDensity:
visualDensity
,
useMaterial3:
useMaterial3
,
useMaterial3:
useMaterial3
,
visualDensity:
visualDensity
,
// COLOR
// COLOR
colorScheme:
colorScheme
,
backgroundColor:
backgroundColor
,
primaryColor:
primaryColor
,
primaryColorLight:
primaryColorLight
,
primaryColorDark:
primaryColorDark
,
focusColor:
focusColor
,
hoverColor:
hoverColor
,
shadowColor:
shadowColor
,
canvasColor:
canvasColor
,
scaffoldBackgroundColor:
scaffoldBackgroundColor
,
bottomAppBarColor:
bottomAppBarColor
,
bottomAppBarColor:
bottomAppBarColor
,
canvasColor:
canvasColor
,
cardColor:
cardColor
,
cardColor:
cardColor
,
colorScheme:
colorScheme
,
dialogBackgroundColor:
dialogBackgroundColor
,
disabledColor:
disabledColor
,
dividerColor:
dividerColor
,
dividerColor:
dividerColor
,
errorColor:
errorColor
,
focusColor:
focusColor
,
highlightColor:
highlightColor
,
highlightColor:
highlightColor
,
splashColor:
splashColor
,
selectedRowColor:
selectedRowColor
,
unselectedWidgetColor:
unselectedWidgetColor
,
disabledColor:
disabledColor
,
secondaryHeaderColor:
secondaryHeaderColor
,
backgroundColor:
backgroundColor
,
dialogBackgroundColor:
dialogBackgroundColor
,
indicatorColor:
indicatorColor
,
hintColor:
hintColor
,
hintColor:
hintColor
,
errorColor:
errorColor
,
hoverColor:
hoverColor
,
indicatorColor:
indicatorColor
,
primaryColor:
primaryColor
,
primaryColorDark:
primaryColorDark
,
primaryColorLight:
primaryColorLight
,
scaffoldBackgroundColor:
scaffoldBackgroundColor
,
secondaryHeaderColor:
secondaryHeaderColor
,
selectedRowColor:
selectedRowColor
,
shadowColor:
shadowColor
,
splashColor:
splashColor
,
toggleableActiveColor:
toggleableActiveColor
,
toggleableActiveColor:
toggleableActiveColor
,
unselectedWidgetColor:
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
typography:
typography
,
textTheme:
textTheme
,
primaryTextTheme:
primaryTextTheme
,
iconTheme:
iconTheme
,
iconTheme:
iconTheme
,
primaryTextTheme:
primaryTextTheme
,
textTheme:
textTheme
,
typography:
typography
,
primaryIconTheme:
primaryIconTheme
,
primaryIconTheme:
primaryIconTheme
,
// COMPONENT THEMES
// COMPONENT THEMES
appBarTheme:
appBarTheme
,
appBarTheme:
appBarTheme
,
...
@@ -628,6 +638,7 @@ class ThemeData with Diagnosticable {
...
@@ -628,6 +638,7 @@ class ThemeData with Diagnosticable {
dividerTheme:
dividerTheme
,
dividerTheme:
dividerTheme
,
drawerTheme:
drawerTheme
,
drawerTheme:
drawerTheme
,
elevatedButtonTheme:
elevatedButtonTheme
,
elevatedButtonTheme:
elevatedButtonTheme
,
expansionTileTheme:
expansionTileTheme
,
floatingActionButtonTheme:
floatingActionButtonTheme
,
floatingActionButtonTheme:
floatingActionButtonTheme
,
listTileTheme:
listTileTheme
,
listTileTheme:
listTileTheme
,
navigationBarTheme:
navigationBarTheme
,
navigationBarTheme:
navigationBarTheme
,
...
@@ -645,7 +656,6 @@ class ThemeData with Diagnosticable {
...
@@ -645,7 +656,6 @@ class ThemeData with Diagnosticable {
timePickerTheme:
timePickerTheme
,
timePickerTheme:
timePickerTheme
,
toggleButtonsTheme:
toggleButtonsTheme
,
toggleButtonsTheme:
toggleButtonsTheme
,
tooltipTheme:
tooltipTheme
,
tooltipTheme:
tooltipTheme
,
expansionTileTheme:
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
accentColor:
accentColor
,
accentColor:
accentColor
,
accentColorBrightness:
accentColorBrightness
,
accentColorBrightness:
accentColorBrightness
,
...
@@ -666,9 +676,11 @@ class ThemeData with Diagnosticable {
...
@@ -666,9 +676,11 @@ class ThemeData with Diagnosticable {
/// create intermediate themes based on two themes created with the
/// create intermediate themes based on two themes created with the
/// [ThemeData] constructor.
/// [ThemeData] constructor.
const
ThemeData
.
raw
({
const
ThemeData
.
raw
({
// Warning: make sure these properties are in the exact same order as in
// For the sanity of the reader, make sure these properties are in the same
// operator == and in the Object.hash method and in the order of fields
// order in every place that they are separated by section comments (e.g.
// in this class, and in the lerp() method.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
required
this
.
applyElevationOverlayColor
,
required
this
.
applyElevationOverlayColor
,
required
this
.
cupertinoOverrideTheme
,
required
this
.
cupertinoOverrideTheme
,
...
@@ -679,42 +691,42 @@ class ThemeData with Diagnosticable {
...
@@ -679,42 +691,42 @@ class ThemeData with Diagnosticable {
required
this
.
platform
,
required
this
.
platform
,
required
this
.
scrollbarTheme
,
required
this
.
scrollbarTheme
,
required
this
.
splashFactory
,
required
this
.
splashFactory
,
required
this
.
visualDensity
,
required
this
.
useMaterial3
,
required
this
.
useMaterial3
,
required
this
.
visualDensity
,
// COLOR
// COLOR
// [colorScheme] is the preferred way to configure colors. The other color
// [colorScheme] is the preferred way to configure colors. The other color
// properties will gradually be phased out, see
// properties will gradually be phased out, see
// https://github.com/flutter/flutter/issues/91772.
// https://github.com/flutter/flutter/issues/91772.
required
this
.
colorScheme
,
required
this
.
backgroundColor
,
required
this
.
primaryColor
,
required
this
.
primaryColorLight
,
required
this
.
primaryColorDark
,
required
this
.
focusColor
,
required
this
.
hoverColor
,
required
this
.
shadowColor
,
required
this
.
canvasColor
,
required
this
.
scaffoldBackgroundColor
,
required
this
.
bottomAppBarColor
,
required
this
.
bottomAppBarColor
,
required
this
.
canvasColor
,
required
this
.
cardColor
,
required
this
.
cardColor
,
required
this
.
colorScheme
,
required
this
.
dialogBackgroundColor
,
required
this
.
disabledColor
,
required
this
.
dividerColor
,
required
this
.
dividerColor
,
required
this
.
errorColor
,
required
this
.
focusColor
,
required
this
.
highlightColor
,
required
this
.
highlightColor
,
required
this
.
splashColor
,
required
this
.
selectedRowColor
,
required
this
.
unselectedWidgetColor
,
required
this
.
disabledColor
,
required
this
.
secondaryHeaderColor
,
required
this
.
backgroundColor
,
required
this
.
dialogBackgroundColor
,
required
this
.
indicatorColor
,
required
this
.
hintColor
,
required
this
.
hintColor
,
required
this
.
errorColor
,
required
this
.
hoverColor
,
required
this
.
indicatorColor
,
required
this
.
primaryColor
,
required
this
.
primaryColorDark
,
required
this
.
primaryColorLight
,
required
this
.
scaffoldBackgroundColor
,
required
this
.
secondaryHeaderColor
,
required
this
.
selectedRowColor
,
required
this
.
shadowColor
,
required
this
.
splashColor
,
required
this
.
toggleableActiveColor
,
required
this
.
toggleableActiveColor
,
required
this
.
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
required
this
.
typography
,
required
this
.
textTheme
,
required
this
.
primaryTextTheme
,
required
this
.
iconTheme
,
required
this
.
iconTheme
,
required
this
.
primaryIconTheme
,
required
this
.
primaryIconTheme
,
required
this
.
primaryTextTheme
,
required
this
.
textTheme
,
required
this
.
typography
,
// COMPONENT THEMES
// COMPONENT THEMES
required
this
.
appBarTheme
,
required
this
.
appBarTheme
,
required
this
.
bannerTheme
,
required
this
.
bannerTheme
,
...
@@ -731,6 +743,7 @@ class ThemeData with Diagnosticable {
...
@@ -731,6 +743,7 @@ class ThemeData with Diagnosticable {
required
this
.
dividerTheme
,
required
this
.
dividerTheme
,
required
this
.
drawerTheme
,
required
this
.
drawerTheme
,
required
this
.
elevatedButtonTheme
,
required
this
.
elevatedButtonTheme
,
required
this
.
expansionTileTheme
,
required
this
.
floatingActionButtonTheme
,
required
this
.
floatingActionButtonTheme
,
required
this
.
listTileTheme
,
required
this
.
listTileTheme
,
required
this
.
navigationBarTheme
,
required
this
.
navigationBarTheme
,
...
@@ -748,7 +761,6 @@ class ThemeData with Diagnosticable {
...
@@ -748,7 +761,6 @@ class ThemeData with Diagnosticable {
required
this
.
timePickerTheme
,
required
this
.
timePickerTheme
,
required
this
.
toggleButtonsTheme
,
required
this
.
toggleButtonsTheme
,
required
this
.
tooltipTheme
,
required
this
.
tooltipTheme
,
required
this
.
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
@Deprecated
(
@Deprecated
(
'Use colorScheme.secondary instead. '
'Use colorScheme.secondary instead. '
...
@@ -816,39 +828,39 @@ class ThemeData with Diagnosticable {
...
@@ -816,39 +828,39 @@ class ThemeData with Diagnosticable {
assert
(
platform
!=
null
),
assert
(
platform
!=
null
),
assert
(
scrollbarTheme
!=
null
),
assert
(
scrollbarTheme
!=
null
),
assert
(
splashFactory
!=
null
),
assert
(
splashFactory
!=
null
),
assert
(
visualDensity
!=
null
),
assert
(
useMaterial3
!=
null
),
assert
(
useMaterial3
!=
null
),
assert
(
visualDensity
!=
null
),
// COLOR
// COLOR
assert
(
colorScheme
!=
null
),
assert
(
backgroundColor
!=
null
),
assert
(
primaryColor
!=
null
),
assert
(
primaryColorLight
!=
null
),
assert
(
primaryColorDark
!=
null
),
assert
(
focusColor
!=
null
),
assert
(
hoverColor
!=
null
),
assert
(
shadowColor
!=
null
),
assert
(
canvasColor
!=
null
),
assert
(
scaffoldBackgroundColor
!=
null
),
assert
(
bottomAppBarColor
!=
null
),
assert
(
bottomAppBarColor
!=
null
),
assert
(
canvasColor
!=
null
),
assert
(
cardColor
!=
null
),
assert
(
cardColor
!=
null
),
assert
(
colorScheme
!=
null
),
assert
(
dialogBackgroundColor
!=
null
),
assert
(
disabledColor
!=
null
),
assert
(
dividerColor
!=
null
),
assert
(
dividerColor
!=
null
),
assert
(
errorColor
!=
null
),
assert
(
focusColor
!=
null
),
assert
(
highlightColor
!=
null
),
assert
(
highlightColor
!=
null
),
assert
(
splashColor
!=
null
),
assert
(
selectedRowColor
!=
null
),
assert
(
unselectedWidgetColor
!=
null
),
assert
(
disabledColor
!=
null
),
assert
(
secondaryHeaderColor
!=
null
),
assert
(
backgroundColor
!=
null
),
assert
(
dialogBackgroundColor
!=
null
),
assert
(
indicatorColor
!=
null
),
assert
(
hintColor
!=
null
),
assert
(
hintColor
!=
null
),
assert
(
errorColor
!=
null
),
assert
(
hoverColor
!=
null
),
assert
(
indicatorColor
!=
null
),
assert
(
primaryColor
!=
null
),
assert
(
primaryColorDark
!=
null
),
assert
(
primaryColorLight
!=
null
),
assert
(
scaffoldBackgroundColor
!=
null
),
assert
(
secondaryHeaderColor
!=
null
),
assert
(
selectedRowColor
!=
null
),
assert
(
shadowColor
!=
null
),
assert
(
splashColor
!=
null
),
assert
(
toggleableActiveColor
!=
null
),
assert
(
toggleableActiveColor
!=
null
),
assert
(
unselectedWidgetColor
!=
null
),
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
assert
(
typography
!=
null
),
assert
(
textTheme
!=
null
),
assert
(
primaryTextTheme
!=
null
),
assert
(
iconTheme
!=
null
),
assert
(
iconTheme
!=
null
),
assert
(
primaryIconTheme
!=
null
),
assert
(
primaryIconTheme
!=
null
),
assert
(
primaryTextTheme
!=
null
),
assert
(
textTheme
!=
null
),
assert
(
typography
!=
null
),
// COMPONENT THEMES
// COMPONENT THEMES
assert
(
appBarTheme
!=
null
),
assert
(
appBarTheme
!=
null
),
assert
(
bannerTheme
!=
null
),
assert
(
bannerTheme
!=
null
),
...
@@ -865,6 +877,7 @@ class ThemeData with Diagnosticable {
...
@@ -865,6 +877,7 @@ class ThemeData with Diagnosticable {
assert
(
dividerTheme
!=
null
),
assert
(
dividerTheme
!=
null
),
assert
(
drawerTheme
!=
null
),
assert
(
drawerTheme
!=
null
),
assert
(
elevatedButtonTheme
!=
null
),
assert
(
elevatedButtonTheme
!=
null
),
assert
(
expansionTileTheme
!=
null
),
assert
(
floatingActionButtonTheme
!=
null
),
assert
(
floatingActionButtonTheme
!=
null
),
assert
(
listTileTheme
!=
null
),
assert
(
listTileTheme
!=
null
),
assert
(
navigationBarTheme
!=
null
),
assert
(
navigationBarTheme
!=
null
),
...
@@ -881,8 +894,7 @@ class ThemeData with Diagnosticable {
...
@@ -881,8 +894,7 @@ class ThemeData with Diagnosticable {
assert
(
textSelectionTheme
!=
null
),
assert
(
textSelectionTheme
!=
null
),
assert
(
timePickerTheme
!=
null
),
assert
(
timePickerTheme
!=
null
),
assert
(
toggleButtonsTheme
!=
null
),
assert
(
toggleButtonsTheme
!=
null
),
assert
(
tooltipTheme
!=
null
),
assert
(
tooltipTheme
!=
null
);
assert
(
expansionTileTheme
!=
null
);
/// Create a [ThemeData] based on the colors in the given [colorScheme] and
/// Create a [ThemeData] based on the colors in the given [colorScheme] and
/// text styles of the optional [textTheme].
/// text styles of the optional [textTheme].
...
@@ -975,33 +987,13 @@ class ThemeData with Diagnosticable {
...
@@ -975,33 +987,13 @@ class ThemeData with Diagnosticable {
/// theme is constructed with [Brightness.dark].
/// theme is constructed with [Brightness.dark].
Brightness
get
brightness
=>
colorScheme
.
brightness
;
Brightness
get
brightness
=>
colorScheme
.
brightness
;
// Warning: make sure these properties are in the exact same order as in
// For the sanity of the reader, make sure these properties are in the same
// Object.hash() and in the raw constructor and in the order of fields in
// order in every place that they are separated by section comments (e.g.
// the class and in the lerp() method.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
/// Specifies which overscroll indicator to use on [TargetPlatform.android].
///
/// When null, the default value of
/// [MaterialScrollBehavior.androidOverscrollIndicator] is
/// [AndroidOverscrollIndicator.glow].
///
/// This property is deprecated. Use the [useMaterial3] flag instead, or
/// override [ScrollBehavior.buildOverscrollIndicator].
///
/// See also:
///
/// * [StretchingOverscrollIndicator], a Material Design edge effect
/// that transforms the contents of a scrollable when overscrolled.
/// * [GlowingOverscrollIndicator], an edge effect that paints a glow
/// over the contents of a scrollable when overscrolled.
@Deprecated
(
'Use ThemeData.useMaterial3 or override ScrollBehavior.buildOverscrollIndicator. '
'This feature was deprecated after v2.13.0-0.0.pre.'
)
final
AndroidOverscrollIndicator
?
androidOverscrollIndicator
;
/// Apply a semi-transparent overlay color on Material surfaces to indicate
/// Apply a semi-transparent overlay color on Material surfaces to indicate
/// elevation for dark themes.
/// elevation for dark themes.
///
///
...
@@ -1139,35 +1131,6 @@ class ThemeData with Diagnosticable {
...
@@ -1139,35 +1131,6 @@ class ThemeData with Diagnosticable {
/// splash with sparkle effects.
/// splash with sparkle effects.
final
InteractiveInkFeatureFactory
splashFactory
;
final
InteractiveInkFeatureFactory
splashFactory
;
/// The density value for specifying the compactness of various UI components.
///
/// {@template flutter.material.themedata.visualDensity}
/// Density, in the context of a UI, is the vertical and horizontal
/// "compactness" of the elements in the UI. It is unitless, since it means
/// different things to different UI elements. For buttons, it affects the
/// spacing around the centered label of the button. For lists, it affects the
/// distance between baselines of entries in the list.
///
/// Typically, density values are integral, but any value in range may be
/// used. The range includes values from [VisualDensity.minimumDensity] (which
/// is -4), to [VisualDensity.maximumDensity] (which is 4), inclusive, where
/// negative values indicate a denser, more compact, UI, and positive values
/// indicate a less dense, more expanded, UI. If a component doesn't support
/// the value given, it will clamp to the nearest supported value.
///
/// The default for visual densities is zero for both vertical and horizontal
/// densities, which corresponds to the default visual density of components
/// in the Material Design specification.
///
/// As a rule of thumb, a change of 1 or -1 in density corresponds to 4
/// logical pixels. However, this is not a strict relationship since
/// components interpret the density values appropriately for their needs.
///
/// A larger value translates to a spacing increase (less dense), and a
/// smaller value translates to a spacing decrease (more dense).
/// {@endtemplate}
final
VisualDensity
visualDensity
;
/// A temporary flag used to opt-in to Material 3 features.
/// A temporary flag used to opt-in to Material 3 features.
///
///
/// If true, then components that have been migrated to Material 3 will
/// If true, then components that have been migrated to Material 3 will
...
@@ -1219,65 +1182,70 @@ class ThemeData with Diagnosticable {
...
@@ -1219,65 +1182,70 @@ class ThemeData with Diagnosticable {
/// * [Material Design 3](https://m3.material.io/).
/// * [Material Design 3](https://m3.material.io/).
final
bool
useMaterial3
;
final
bool
useMaterial3
;
// COLOR
/// The density value for specifying the compactness of various UI components.
/// A set of twelve colors that can be used to configure the
/// color properties of most components.
///
/// This property was added much later than the theme's set of highly
/// specific colors, like [cardColor], [buttonColor], [canvasColor] etc.
/// New components can be defined exclusively in terms of [colorScheme].
/// Existing components will gradually migrate to it, to the extent
/// that is possible without significant backwards compatibility breaks.
final
ColorScheme
colorScheme
;
/// The background color for major parts of the app (toolbars, tab bars, etc)
///
///
/// The theme's [colorScheme] property contains [ColorScheme.primary], as
/// {@template flutter.material.themedata.visualDensity}
/// well as a color that contrasts well with the primary color called
/// Density, in the context of a UI, is the vertical and horizontal
/// [ColorScheme.onPrimary]. It might be simpler to just configure an app's
/// "compactness" of the elements in the UI. It is unitless, since it means
/// visuals in terms of the theme's [colorScheme].
/// different things to different UI elements. For buttons, it affects the
final
Color
primaryColor
;
/// spacing around the centered label of the button. For lists, it affects the
/// distance between baselines of entries in the list.
/// A lighter version of the [primaryColor].
final
Color
primaryColorLight
;
/// A darker version of the [primaryColor].
final
Color
primaryColorDark
;
/// The focus color used indicate that a component has the input focus.
final
Color
focusColor
;
/// The hover color used to indicate when a pointer is hovering over a
/// component.
final
Color
hoverColor
;
/// The color that the [Material] widget uses to draw elevation shadows.
///
///
/// Defaults to fully opaque black.
/// Typically, density values are integral, but any value in range may be
/// used. The range includes values from [VisualDensity.minimumDensity] (which
/// is -4), to [VisualDensity.maximumDensity] (which is 4), inclusive, where
/// negative values indicate a denser, more compact, UI, and positive values
/// indicate a less dense, more expanded, UI. If a component doesn't support
/// the value given, it will clamp to the nearest supported value.
///
///
/// Shadows can be difficult to see in a dark theme, so the elevation of a
/// The default for visual densities is zero for both vertical and horizontal
/// surface should be rendered with an "overlay" in addition to the shadow.
/// densities, which corresponds to the default visual density of components
/// As the elevation of the component increases, the overlay increases in
/// in the Material Design specification.
/// opacity. The [applyElevationOverlayColor] property turns the elevation
///
/// overlay on or off for dark themes.
/// As a rule of thumb, a change of 1 or -1 in density corresponds to 4
final
Color
shadowColor
;
/// logical pixels. However, this is not a strict relationship since
/// components interpret the density values appropriately for their needs.
///
/// A larger value translates to a spacing increase (less dense), and a
/// smaller value translates to a spacing decrease (more dense).
/// {@endtemplate}
final
VisualDensity
visualDensity
;
/// The default color of [MaterialType.canvas] [Material].
// COLOR
final
Color
canvasColor
;
///
The default color of the [Material] that underlies the [Scaffold]. T
he
///
A color that contrasts with the [primaryColor], e.g. used as t
he
///
background color for a typical material app or a page within the app
.
///
remaining part of a progress bar
.
final
Color
scaffoldB
ackgroundColor
;
final
Color
b
ackgroundColor
;
/// The default color of the [BottomAppBar].
/// The default color of the [BottomAppBar].
///
///
/// This can be overridden by specifying [BottomAppBar.color].
/// This can be overridden by specifying [BottomAppBar.color].
final
Color
bottomAppBarColor
;
final
Color
bottomAppBarColor
;
/// The default color of [MaterialType.canvas] [Material].
final
Color
canvasColor
;
/// The color of [Material] when it is used as a [Card].
/// The color of [Material] when it is used as a [Card].
final
Color
cardColor
;
final
Color
cardColor
;
/// A set of twelve colors that can be used to configure the
/// color properties of most components.
///
/// This property was added much later than the theme's set of highly
/// specific colors, like [cardColor], [buttonColor], [canvasColor] etc.
/// New components can be defined exclusively in terms of [colorScheme].
/// Existing components will gradually migrate to it, to the extent
/// that is possible without significant backwards compatibility breaks.
final
ColorScheme
colorScheme
;
/// The background color of [Dialog] elements.
final
Color
dialogBackgroundColor
;
/// The color used for widgets that are inoperative, regardless of
/// their state. For example, a disabled checkbox (which may be
/// checked or unchecked).
final
Color
disabledColor
;
/// The color of [Divider]s and [PopupMenuDivider]s, also used
/// The color of [Divider]s and [PopupMenuDivider]s, also used
/// between [ListTile]s, between rows in [DataTable]s, and so forth.
/// between [ListTile]s, between rows in [DataTable]s, and so forth.
///
///
...
@@ -1285,27 +1253,44 @@ class ThemeData with Diagnosticable {
...
@@ -1285,27 +1253,44 @@ class ThemeData with Diagnosticable {
/// [Divider.createBorderSide].
/// [Divider.createBorderSide].
final
Color
dividerColor
;
final
Color
dividerColor
;
/// The color to use for input validation errors, e.g. in [TextField] fields.
final
Color
errorColor
;
/// The focus color used indicate that a component has the input focus.
final
Color
focusColor
;
/// The highlight color used during ink splash animations or to
/// The highlight color used during ink splash animations or to
/// indicate an item in a menu is selected.
/// indicate an item in a menu is selected.
final
Color
highlightColor
;
final
Color
highlightColor
;
/// The color of ink splashes.
/// The color to use for hint text or placeholder text, e.g. in
/// [TextField] fields.
final
Color
hintColor
;
/// The hover color used to indicate when a pointer is hovering over a
/// component.
final
Color
hoverColor
;
/// The color of the selected tab indicator in a tab bar.
final
Color
indicatorColor
;
/// The background color for major parts of the app (toolbars, tab bars, etc)
///
///
/// See also:
/// The theme's [colorScheme] property contains [ColorScheme.primary], as
/// * [splashFactory], which defines the appearance of the splash.
/// well as a color that contrasts well with the primary color called
final
Color
splashColor
;
/// [ColorScheme.onPrimary]. It might be simpler to just configure an app's
/// visuals in terms of the theme's [colorScheme].
final
Color
primaryColor
;
///
The color used to highlight selected rows
.
///
A darker version of the [primaryColor]
.
final
Color
selectedRowColor
;
final
Color
primaryColorDark
;
/// The color used for widgets in their inactive (but enabled)
/// A lighter version of the [primaryColor].
/// state. For example, an unchecked checkbox. See also [disabledColor].
final
Color
primaryColorLight
;
final
Color
unselectedWidgetColor
;
/// The color used for widgets that are inoperative, regardless of
/// The default color of the [Material] that underlies the [Scaffold]. The
/// their state. For example, a disabled checkbox (which may be
/// background color for a typical material app or a page within the app.
/// checked or unchecked).
final
Color
scaffoldBackgroundColor
;
final
Color
disabledColor
;
/// The color of the header of a [PaginatedDataTable] when there are selected rows.
/// The color of the header of a [PaginatedDataTable] when there are selected rows.
// According to the spec for data tables:
// According to the spec for data tables:
...
@@ -1313,45 +1298,52 @@ class ThemeData with Diagnosticable {
...
@@ -1313,45 +1298,52 @@ class ThemeData with Diagnosticable {
// ...this should be the "50-value of secondary app color".
// ...this should be the "50-value of secondary app color".
final
Color
secondaryHeaderColor
;
final
Color
secondaryHeaderColor
;
/// A color that contrasts with the [primaryColor], e.g. used as the
/// The color used to highlight selected rows.
/// remaining part of a progress bar.
final
Color
selectedRowColor
;
final
Color
backgroundColor
;
/// The background color of [Dialog] elements.
final
Color
dialogBackgroundColor
;
/// The color of the selected tab indicator in a tab bar.
final
Color
indicatorColor
;
/// The color to use for hint text or placeholder text, e.g. in
/// The color that the [Material] widget uses to draw elevation shadows.
/// [TextField] fields.
///
final
Color
hintColor
;
/// Defaults to fully opaque black.
///
/// Shadows can be difficult to see in a dark theme, so the elevation of a
/// surface should be rendered with an "overlay" in addition to the shadow.
/// As the elevation of the component increases, the overlay increases in
/// opacity. The [applyElevationOverlayColor] property turns the elevation
/// overlay on or off for dark themes.
final
Color
shadowColor
;
/// The color to use for input validation errors, e.g. in [TextField] fields.
/// The color of ink splashes.
final
Color
errorColor
;
///
/// See also:
/// * [splashFactory], which defines the appearance of the splash.
final
Color
splashColor
;
/// The color used to highlight the active states of toggleable widgets like
/// The color used to highlight the active states of toggleable widgets like
/// [Switch], [Radio], and [Checkbox].
/// [Switch], [Radio], and [Checkbox].
final
Color
toggleableActiveColor
;
final
Color
toggleableActiveColor
;
/// The color used for widgets in their inactive (but enabled)
/// state. For example, an unchecked checkbox. See also [disabledColor].
final
Color
unselectedWidgetColor
;
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
/// The color and geometry [TextTheme] values used to configure [textTheme].
/// An icon theme that contrasts with the card and canvas colors.
///
final
IconThemeData
iconTheme
;
/// Defaults to a [platform]-appropriate typography.
final
Typography
typography
;
///
Text with a color that contrasts with the card and canvas colors
.
///
An icon theme that contrasts with the primary color
.
final
TextTheme
text
Theme
;
final
IconThemeData
primaryIcon
Theme
;
/// A text theme that contrasts with the primary color.
/// A text theme that contrasts with the primary color.
final
TextTheme
primaryTextTheme
;
final
TextTheme
primaryTextTheme
;
///
An icon theme
that contrasts with the card and canvas colors.
///
Text with a color
that contrasts with the card and canvas colors.
final
IconThemeData
icon
Theme
;
final
TextTheme
text
Theme
;
/// An icon theme that contrasts with the primary color.
/// The color and geometry [TextTheme] values used to configure [textTheme].
final
IconThemeData
primaryIconTheme
;
///
/// Defaults to a [platform]-appropriate typography.
final
Typography
typography
;
// COMPONENT THEMES
// COMPONENT THEMES
...
@@ -1410,6 +1402,9 @@ class ThemeData with Diagnosticable {
...
@@ -1410,6 +1402,9 @@ class ThemeData with Diagnosticable {
/// [ElevatedButton]s.
/// [ElevatedButton]s.
final
ElevatedButtonThemeData
elevatedButtonTheme
;
final
ElevatedButtonThemeData
elevatedButtonTheme
;
/// A theme for customizing the visual properties of [ExpansionTile]s.
final
ExpansionTileThemeData
expansionTileTheme
;
/// A theme for customizing the shape, elevation, and color of a
/// A theme for customizing the shape, elevation, and color of a
/// [FloatingActionButton].
/// [FloatingActionButton].
final
FloatingActionButtonThemeData
floatingActionButtonTheme
;
final
FloatingActionButtonThemeData
floatingActionButtonTheme
;
...
@@ -1471,9 +1466,6 @@ class ThemeData with Diagnosticable {
...
@@ -1471,9 +1466,6 @@ class ThemeData with Diagnosticable {
/// This is the value returned from [TooltipTheme.of].
/// This is the value returned from [TooltipTheme.of].
final
TooltipThemeData
tooltipTheme
;
final
TooltipThemeData
tooltipTheme
;
/// A theme for customizing the visual properties of [ExpansionTile]s.
final
ExpansionTileThemeData
expansionTileTheme
;
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
/// Obsolete property that was originally used as the foreground
/// Obsolete property that was originally used as the foreground
...
@@ -1591,10 +1583,36 @@ class ThemeData with Diagnosticable {
...
@@ -1591,10 +1583,36 @@ class ThemeData with Diagnosticable {
Brightness
get
primaryColorBrightness
=>
_primaryColorBrightness
!;
Brightness
get
primaryColorBrightness
=>
_primaryColorBrightness
!;
final
Brightness
?
_primaryColorBrightness
;
final
Brightness
?
_primaryColorBrightness
;
/// Specifies which overscroll indicator to use on [TargetPlatform.android].
///
/// When null, the default value of
/// [MaterialScrollBehavior.androidOverscrollIndicator] is
/// [AndroidOverscrollIndicator.glow].
///
/// This property is deprecated. Use the [useMaterial3] flag instead, or
/// override [ScrollBehavior.buildOverscrollIndicator].
///
/// See also:
///
/// * [StretchingOverscrollIndicator], a Material Design edge effect
/// that transforms the contents of a scrollable when overscrolled.
/// * [GlowingOverscrollIndicator], an edge effect that paints a glow
/// over the contents of a scrollable when overscrolled.
@Deprecated
(
'Use ThemeData.useMaterial3 or override ScrollBehavior.buildOverscrollIndicator. '
'This feature was deprecated after v2.13.0-0.0.pre.'
)
final
AndroidOverscrollIndicator
?
androidOverscrollIndicator
;
/// Creates a copy of this theme but with the given fields replaced with the new values.
/// Creates a copy of this theme but with the given fields replaced with the new values.
///
///
/// The [brightness] value is applied to the [colorScheme].
/// The [brightness] value is applied to the [colorScheme].
ThemeData
copyWith
({
ThemeData
copyWith
({
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
bool
?
applyElevationOverlayColor
,
bool
?
applyElevationOverlayColor
,
NoDefaultCupertinoThemeData
?
cupertinoOverrideTheme
,
NoDefaultCupertinoThemeData
?
cupertinoOverrideTheme
,
...
@@ -1605,43 +1623,43 @@ class ThemeData with Diagnosticable {
...
@@ -1605,43 +1623,43 @@ class ThemeData with Diagnosticable {
TargetPlatform
?
platform
,
TargetPlatform
?
platform
,
ScrollbarThemeData
?
scrollbarTheme
,
ScrollbarThemeData
?
scrollbarTheme
,
InteractiveInkFeatureFactory
?
splashFactory
,
InteractiveInkFeatureFactory
?
splashFactory
,
VisualDensity
?
visualDensity
,
bool
?
useMaterial3
,
bool
?
useMaterial3
,
VisualDensity
?
visualDensity
,
// COLOR
// COLOR
// [colorScheme] is the preferred way to configure colors. The other color
// [colorScheme] is the preferred way to configure colors. The other color
// properties will gradually be phased out, see
// properties will gradually be phased out, see
// https://github.com/flutter/flutter/issues/91772.
// https://github.com/flutter/flutter/issues/91772.
ColorScheme
?
colorScheme
,
Color
?
backgroundColor
,
Color
?
bottomAppBarColor
,
Brightness
?
brightness
,
Brightness
?
brightness
,
Color
?
primaryColor
,
Color
?
primaryColorLight
,
Color
?
primaryColorDark
,
Color
?
focusColor
,
Color
?
hoverColor
,
Color
?
shadowColor
,
Color
?
canvasColor
,
Color
?
canvasColor
,
Color
?
scaffoldBackgroundColor
,
Color
?
bottomAppBarColor
,
Color
?
cardColor
,
Color
?
cardColor
,
ColorScheme
?
colorScheme
,
Color
?
dialogBackgroundColor
,
Color
?
disabledColor
,
Color
?
dividerColor
,
Color
?
dividerColor
,
Color
?
errorColor
,
Color
?
focusColor
,
Color
?
highlightColor
,
Color
?
highlightColor
,
Color
?
splashColor
,
Color
?
selectedRowColor
,
Color
?
unselectedWidgetColor
,
Color
?
disabledColor
,
Color
?
secondaryHeaderColor
,
Color
?
backgroundColor
,
Color
?
dialogBackgroundColor
,
Color
?
indicatorColor
,
Color
?
hintColor
,
Color
?
hintColor
,
Color
?
errorColor
,
Color
?
hoverColor
,
Color
?
indicatorColor
,
Color
?
primaryColor
,
Color
?
primaryColorDark
,
Color
?
primaryColorLight
,
Color
?
scaffoldBackgroundColor
,
Color
?
secondaryHeaderColor
,
Color
?
selectedRowColor
,
Color
?
shadowColor
,
Color
?
splashColor
,
Color
?
toggleableActiveColor
,
Color
?
toggleableActiveColor
,
Color
?
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
Typography
?
typography
,
TextTheme
?
textTheme
,
TextTheme
?
primaryTextTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
iconTheme
,
IconThemeData
?
primaryIconTheme
,
IconThemeData
?
primaryIconTheme
,
TextTheme
?
primaryTextTheme
,
TextTheme
?
textTheme
,
Typography
?
typography
,
// COMPONENT THEMES
// COMPONENT THEMES
AppBarTheme
?
appBarTheme
,
AppBarTheme
?
appBarTheme
,
MaterialBannerThemeData
?
bannerTheme
,
MaterialBannerThemeData
?
bannerTheme
,
...
@@ -1658,6 +1676,7 @@ class ThemeData with Diagnosticable {
...
@@ -1658,6 +1676,7 @@ class ThemeData with Diagnosticable {
DividerThemeData
?
dividerTheme
,
DividerThemeData
?
dividerTheme
,
DrawerThemeData
?
drawerTheme
,
DrawerThemeData
?
drawerTheme
,
ElevatedButtonThemeData
?
elevatedButtonTheme
,
ElevatedButtonThemeData
?
elevatedButtonTheme
,
ExpansionTileThemeData
?
expansionTileTheme
,
FloatingActionButtonThemeData
?
floatingActionButtonTheme
,
FloatingActionButtonThemeData
?
floatingActionButtonTheme
,
ListTileThemeData
?
listTileTheme
,
ListTileThemeData
?
listTileTheme
,
NavigationBarThemeData
?
navigationBarTheme
,
NavigationBarThemeData
?
navigationBarTheme
,
...
@@ -1675,7 +1694,6 @@ class ThemeData with Diagnosticable {
...
@@ -1675,7 +1694,6 @@ class ThemeData with Diagnosticable {
TimePickerThemeData
?
timePickerTheme
,
TimePickerThemeData
?
timePickerTheme
,
ToggleButtonsThemeData
?
toggleButtonsTheme
,
ToggleButtonsThemeData
?
toggleButtonsTheme
,
TooltipThemeData
?
tooltipTheme
,
TooltipThemeData
?
tooltipTheme
,
ExpansionTileThemeData
?
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
@Deprecated
(
@Deprecated
(
'No longer used by the framework, please remove any reference to it. '
'No longer used by the framework, please remove any reference to it. '
...
@@ -1728,6 +1746,11 @@ class ThemeData with Diagnosticable {
...
@@ -1728,6 +1746,11 @@ class ThemeData with Diagnosticable {
})
{
})
{
cupertinoOverrideTheme
=
cupertinoOverrideTheme
?.
noDefault
();
cupertinoOverrideTheme
=
cupertinoOverrideTheme
?.
noDefault
();
return
ThemeData
.
raw
(
return
ThemeData
.
raw
(
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
applyElevationOverlayColor:
applyElevationOverlayColor
??
this
.
applyElevationOverlayColor
,
applyElevationOverlayColor:
applyElevationOverlayColor
??
this
.
applyElevationOverlayColor
,
cupertinoOverrideTheme:
cupertinoOverrideTheme
??
this
.
cupertinoOverrideTheme
,
cupertinoOverrideTheme:
cupertinoOverrideTheme
??
this
.
cupertinoOverrideTheme
,
...
@@ -1738,39 +1761,39 @@ class ThemeData with Diagnosticable {
...
@@ -1738,39 +1761,39 @@ class ThemeData with Diagnosticable {
platform:
platform
??
this
.
platform
,
platform:
platform
??
this
.
platform
,
scrollbarTheme:
scrollbarTheme
??
this
.
scrollbarTheme
,
scrollbarTheme:
scrollbarTheme
??
this
.
scrollbarTheme
,
splashFactory:
splashFactory
??
this
.
splashFactory
,
splashFactory:
splashFactory
??
this
.
splashFactory
,
visualDensity:
visualDensity
??
this
.
visualDensity
,
useMaterial3:
useMaterial3
??
this
.
useMaterial3
,
useMaterial3:
useMaterial3
??
this
.
useMaterial3
,
visualDensity:
visualDensity
??
this
.
visualDensity
,
// COLOR
// COLOR
colorScheme:
(
colorScheme
??
this
.
colorScheme
).
copyWith
(
brightness:
brightness
),
backgroundColor:
backgroundColor
??
this
.
backgroundColor
,
primaryColor:
primaryColor
??
this
.
primaryColor
,
primaryColorLight:
primaryColorLight
??
this
.
primaryColorLight
,
primaryColorDark:
primaryColorDark
??
this
.
primaryColorDark
,
focusColor:
focusColor
??
this
.
focusColor
,
hoverColor:
hoverColor
??
this
.
hoverColor
,
shadowColor:
shadowColor
??
this
.
shadowColor
,
canvasColor:
canvasColor
??
this
.
canvasColor
,
scaffoldBackgroundColor:
scaffoldBackgroundColor
??
this
.
scaffoldBackgroundColor
,
bottomAppBarColor:
bottomAppBarColor
??
this
.
bottomAppBarColor
,
bottomAppBarColor:
bottomAppBarColor
??
this
.
bottomAppBarColor
,
canvasColor:
canvasColor
??
this
.
canvasColor
,
cardColor:
cardColor
??
this
.
cardColor
,
cardColor:
cardColor
??
this
.
cardColor
,
colorScheme:
(
colorScheme
??
this
.
colorScheme
).
copyWith
(
brightness:
brightness
),
dialogBackgroundColor:
dialogBackgroundColor
??
this
.
dialogBackgroundColor
,
disabledColor:
disabledColor
??
this
.
disabledColor
,
dividerColor:
dividerColor
??
this
.
dividerColor
,
dividerColor:
dividerColor
??
this
.
dividerColor
,
errorColor:
errorColor
??
this
.
errorColor
,
focusColor:
focusColor
??
this
.
focusColor
,
highlightColor:
highlightColor
??
this
.
highlightColor
,
highlightColor:
highlightColor
??
this
.
highlightColor
,
splashColor:
splashColor
??
this
.
splashColor
,
selectedRowColor:
selectedRowColor
??
this
.
selectedRowColor
,
unselectedWidgetColor:
unselectedWidgetColor
??
this
.
unselectedWidgetColor
,
disabledColor:
disabledColor
??
this
.
disabledColor
,
secondaryHeaderColor:
secondaryHeaderColor
??
this
.
secondaryHeaderColor
,
backgroundColor:
backgroundColor
??
this
.
backgroundColor
,
dialogBackgroundColor:
dialogBackgroundColor
??
this
.
dialogBackgroundColor
,
indicatorColor:
indicatorColor
??
this
.
indicatorColor
,
hintColor:
hintColor
??
this
.
hintColor
,
hintColor:
hintColor
??
this
.
hintColor
,
errorColor:
errorColor
??
this
.
errorColor
,
hoverColor:
hoverColor
??
this
.
hoverColor
,
indicatorColor:
indicatorColor
??
this
.
indicatorColor
,
primaryColor:
primaryColor
??
this
.
primaryColor
,
primaryColorDark:
primaryColorDark
??
this
.
primaryColorDark
,
primaryColorLight:
primaryColorLight
??
this
.
primaryColorLight
,
scaffoldBackgroundColor:
scaffoldBackgroundColor
??
this
.
scaffoldBackgroundColor
,
secondaryHeaderColor:
secondaryHeaderColor
??
this
.
secondaryHeaderColor
,
selectedRowColor:
selectedRowColor
??
this
.
selectedRowColor
,
shadowColor:
shadowColor
??
this
.
shadowColor
,
splashColor:
splashColor
??
this
.
splashColor
,
toggleableActiveColor:
toggleableActiveColor
??
this
.
toggleableActiveColor
,
toggleableActiveColor:
toggleableActiveColor
??
this
.
toggleableActiveColor
,
unselectedWidgetColor:
unselectedWidgetColor
??
this
.
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
typography:
typography
??
this
.
typography
,
textTheme:
textTheme
??
this
.
textTheme
,
primaryTextTheme:
primaryTextTheme
??
this
.
primaryTextTheme
,
iconTheme:
iconTheme
??
this
.
iconTheme
,
iconTheme:
iconTheme
??
this
.
iconTheme
,
primaryIconTheme:
primaryIconTheme
??
this
.
primaryIconTheme
,
primaryIconTheme:
primaryIconTheme
??
this
.
primaryIconTheme
,
primaryTextTheme:
primaryTextTheme
??
this
.
primaryTextTheme
,
textTheme:
textTheme
??
this
.
textTheme
,
typography:
typography
??
this
.
typography
,
// COMPONENT THEMES
// COMPONENT THEMES
appBarTheme:
appBarTheme
??
this
.
appBarTheme
,
appBarTheme:
appBarTheme
??
this
.
appBarTheme
,
bannerTheme:
bannerTheme
??
this
.
bannerTheme
,
bannerTheme:
bannerTheme
??
this
.
bannerTheme
,
...
@@ -1787,6 +1810,7 @@ class ThemeData with Diagnosticable {
...
@@ -1787,6 +1810,7 @@ class ThemeData with Diagnosticable {
dividerTheme:
dividerTheme
??
this
.
dividerTheme
,
dividerTheme:
dividerTheme
??
this
.
dividerTheme
,
drawerTheme:
drawerTheme
??
this
.
drawerTheme
,
drawerTheme:
drawerTheme
??
this
.
drawerTheme
,
elevatedButtonTheme:
elevatedButtonTheme
??
this
.
elevatedButtonTheme
,
elevatedButtonTheme:
elevatedButtonTheme
??
this
.
elevatedButtonTheme
,
expansionTileTheme:
expansionTileTheme
??
this
.
expansionTileTheme
,
floatingActionButtonTheme:
floatingActionButtonTheme
??
this
.
floatingActionButtonTheme
,
floatingActionButtonTheme:
floatingActionButtonTheme
??
this
.
floatingActionButtonTheme
,
listTileTheme:
listTileTheme
??
this
.
listTileTheme
,
listTileTheme:
listTileTheme
??
this
.
listTileTheme
,
navigationBarTheme:
navigationBarTheme
??
this
.
navigationBarTheme
,
navigationBarTheme:
navigationBarTheme
??
this
.
navigationBarTheme
,
...
@@ -1804,7 +1828,6 @@ class ThemeData with Diagnosticable {
...
@@ -1804,7 +1828,6 @@ class ThemeData with Diagnosticable {
timePickerTheme:
timePickerTheme
??
this
.
timePickerTheme
,
timePickerTheme:
timePickerTheme
??
this
.
timePickerTheme
,
toggleButtonsTheme:
toggleButtonsTheme
??
this
.
toggleButtonsTheme
,
toggleButtonsTheme:
toggleButtonsTheme
??
this
.
toggleButtonsTheme
,
tooltipTheme:
tooltipTheme
??
this
.
tooltipTheme
,
tooltipTheme:
tooltipTheme
??
this
.
tooltipTheme
,
expansionTileTheme:
expansionTileTheme
??
this
.
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
accentColor:
accentColor
??
this
.
accentColor
,
accentColor:
accentColor
??
this
.
accentColor
,
accentColorBrightness:
accentColorBrightness
??
this
.
accentColorBrightness
,
accentColorBrightness:
accentColorBrightness
??
this
.
accentColorBrightness
,
...
@@ -1919,10 +1942,12 @@ class ThemeData with Diagnosticable {
...
@@ -1919,10 +1942,12 @@ class ThemeData with Diagnosticable {
assert
(
a
!=
null
);
assert
(
a
!=
null
);
assert
(
b
!=
null
);
assert
(
b
!=
null
);
assert
(
t
!=
null
);
assert
(
t
!=
null
);
// Warning: make sure these properties are in the exact same order as in
// Object.hash() and in the raw constructor and in the order of fields in
// the class and in the lerp() method.
return
ThemeData
.
raw
(
return
ThemeData
.
raw
(
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
applyElevationOverlayColor:
t
<
0.5
?
a
.
applyElevationOverlayColor
:
b
.
applyElevationOverlayColor
,
applyElevationOverlayColor:
t
<
0.5
?
a
.
applyElevationOverlayColor
:
b
.
applyElevationOverlayColor
,
cupertinoOverrideTheme:
t
<
0.5
?
a
.
cupertinoOverrideTheme
:
b
.
cupertinoOverrideTheme
,
cupertinoOverrideTheme:
t
<
0.5
?
a
.
cupertinoOverrideTheme
:
b
.
cupertinoOverrideTheme
,
...
@@ -1933,39 +1958,39 @@ class ThemeData with Diagnosticable {
...
@@ -1933,39 +1958,39 @@ class ThemeData with Diagnosticable {
platform:
t
<
0.5
?
a
.
platform
:
b
.
platform
,
platform:
t
<
0.5
?
a
.
platform
:
b
.
platform
,
scrollbarTheme:
ScrollbarThemeData
.
lerp
(
a
.
scrollbarTheme
,
b
.
scrollbarTheme
,
t
),
scrollbarTheme:
ScrollbarThemeData
.
lerp
(
a
.
scrollbarTheme
,
b
.
scrollbarTheme
,
t
),
splashFactory:
t
<
0.5
?
a
.
splashFactory
:
b
.
splashFactory
,
splashFactory:
t
<
0.5
?
a
.
splashFactory
:
b
.
splashFactory
,
visualDensity:
VisualDensity
.
lerp
(
a
.
visualDensity
,
b
.
visualDensity
,
t
),
useMaterial3:
t
<
0.5
?
a
.
useMaterial3
:
b
.
useMaterial3
,
useMaterial3:
t
<
0.5
?
a
.
useMaterial3
:
b
.
useMaterial3
,
visualDensity:
VisualDensity
.
lerp
(
a
.
visualDensity
,
b
.
visualDensity
,
t
),
// COLOR
// COLOR
colorScheme:
ColorScheme
.
lerp
(
a
.
colorScheme
,
b
.
colorScheme
,
t
),
backgroundColor:
Color
.
lerp
(
a
.
backgroundColor
,
b
.
backgroundColor
,
t
)!,
primaryColor:
Color
.
lerp
(
a
.
primaryColor
,
b
.
primaryColor
,
t
)!,
primaryColorLight:
Color
.
lerp
(
a
.
primaryColorLight
,
b
.
primaryColorLight
,
t
)!,
primaryColorDark:
Color
.
lerp
(
a
.
primaryColorDark
,
b
.
primaryColorDark
,
t
)!,
focusColor:
Color
.
lerp
(
a
.
focusColor
,
b
.
focusColor
,
t
)!,
hoverColor:
Color
.
lerp
(
a
.
hoverColor
,
b
.
hoverColor
,
t
)!,
shadowColor:
Color
.
lerp
(
a
.
shadowColor
,
b
.
shadowColor
,
t
)!,
canvasColor:
Color
.
lerp
(
a
.
canvasColor
,
b
.
canvasColor
,
t
)!,
scaffoldBackgroundColor:
Color
.
lerp
(
a
.
scaffoldBackgroundColor
,
b
.
scaffoldBackgroundColor
,
t
)!,
bottomAppBarColor:
Color
.
lerp
(
a
.
bottomAppBarColor
,
b
.
bottomAppBarColor
,
t
)!,
bottomAppBarColor:
Color
.
lerp
(
a
.
bottomAppBarColor
,
b
.
bottomAppBarColor
,
t
)!,
canvasColor:
Color
.
lerp
(
a
.
canvasColor
,
b
.
canvasColor
,
t
)!,
cardColor:
Color
.
lerp
(
a
.
cardColor
,
b
.
cardColor
,
t
)!,
cardColor:
Color
.
lerp
(
a
.
cardColor
,
b
.
cardColor
,
t
)!,
colorScheme:
ColorScheme
.
lerp
(
a
.
colorScheme
,
b
.
colorScheme
,
t
),
dialogBackgroundColor:
Color
.
lerp
(
a
.
dialogBackgroundColor
,
b
.
dialogBackgroundColor
,
t
)!,
disabledColor:
Color
.
lerp
(
a
.
disabledColor
,
b
.
disabledColor
,
t
)!,
dividerColor:
Color
.
lerp
(
a
.
dividerColor
,
b
.
dividerColor
,
t
)!,
dividerColor:
Color
.
lerp
(
a
.
dividerColor
,
b
.
dividerColor
,
t
)!,
errorColor:
Color
.
lerp
(
a
.
errorColor
,
b
.
errorColor
,
t
)!,
focusColor:
Color
.
lerp
(
a
.
focusColor
,
b
.
focusColor
,
t
)!,
highlightColor:
Color
.
lerp
(
a
.
highlightColor
,
b
.
highlightColor
,
t
)!,
highlightColor:
Color
.
lerp
(
a
.
highlightColor
,
b
.
highlightColor
,
t
)!,
splashColor:
Color
.
lerp
(
a
.
splashColor
,
b
.
splashColor
,
t
)!,
selectedRowColor:
Color
.
lerp
(
a
.
selectedRowColor
,
b
.
selectedRowColor
,
t
)!,
unselectedWidgetColor:
Color
.
lerp
(
a
.
unselectedWidgetColor
,
b
.
unselectedWidgetColor
,
t
)!,
disabledColor:
Color
.
lerp
(
a
.
disabledColor
,
b
.
disabledColor
,
t
)!,
secondaryHeaderColor:
Color
.
lerp
(
a
.
secondaryHeaderColor
,
b
.
secondaryHeaderColor
,
t
)!,
backgroundColor:
Color
.
lerp
(
a
.
backgroundColor
,
b
.
backgroundColor
,
t
)!,
dialogBackgroundColor:
Color
.
lerp
(
a
.
dialogBackgroundColor
,
b
.
dialogBackgroundColor
,
t
)!,
indicatorColor:
Color
.
lerp
(
a
.
indicatorColor
,
b
.
indicatorColor
,
t
)!,
hintColor:
Color
.
lerp
(
a
.
hintColor
,
b
.
hintColor
,
t
)!,
hintColor:
Color
.
lerp
(
a
.
hintColor
,
b
.
hintColor
,
t
)!,
errorColor:
Color
.
lerp
(
a
.
errorColor
,
b
.
errorColor
,
t
)!,
hoverColor:
Color
.
lerp
(
a
.
hoverColor
,
b
.
hoverColor
,
t
)!,
indicatorColor:
Color
.
lerp
(
a
.
indicatorColor
,
b
.
indicatorColor
,
t
)!,
primaryColor:
Color
.
lerp
(
a
.
primaryColor
,
b
.
primaryColor
,
t
)!,
primaryColorDark:
Color
.
lerp
(
a
.
primaryColorDark
,
b
.
primaryColorDark
,
t
)!,
primaryColorLight:
Color
.
lerp
(
a
.
primaryColorLight
,
b
.
primaryColorLight
,
t
)!,
scaffoldBackgroundColor:
Color
.
lerp
(
a
.
scaffoldBackgroundColor
,
b
.
scaffoldBackgroundColor
,
t
)!,
secondaryHeaderColor:
Color
.
lerp
(
a
.
secondaryHeaderColor
,
b
.
secondaryHeaderColor
,
t
)!,
selectedRowColor:
Color
.
lerp
(
a
.
selectedRowColor
,
b
.
selectedRowColor
,
t
)!,
shadowColor:
Color
.
lerp
(
a
.
shadowColor
,
b
.
shadowColor
,
t
)!,
splashColor:
Color
.
lerp
(
a
.
splashColor
,
b
.
splashColor
,
t
)!,
toggleableActiveColor:
Color
.
lerp
(
a
.
toggleableActiveColor
,
b
.
toggleableActiveColor
,
t
)!,
toggleableActiveColor:
Color
.
lerp
(
a
.
toggleableActiveColor
,
b
.
toggleableActiveColor
,
t
)!,
unselectedWidgetColor:
Color
.
lerp
(
a
.
unselectedWidgetColor
,
b
.
unselectedWidgetColor
,
t
)!,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
typography:
Typography
.
lerp
(
a
.
typography
,
b
.
typography
,
t
),
textTheme:
TextTheme
.
lerp
(
a
.
textTheme
,
b
.
textTheme
,
t
),
primaryTextTheme:
TextTheme
.
lerp
(
a
.
primaryTextTheme
,
b
.
primaryTextTheme
,
t
),
iconTheme:
IconThemeData
.
lerp
(
a
.
iconTheme
,
b
.
iconTheme
,
t
),
iconTheme:
IconThemeData
.
lerp
(
a
.
iconTheme
,
b
.
iconTheme
,
t
),
primaryIconTheme:
IconThemeData
.
lerp
(
a
.
primaryIconTheme
,
b
.
primaryIconTheme
,
t
),
primaryIconTheme:
IconThemeData
.
lerp
(
a
.
primaryIconTheme
,
b
.
primaryIconTheme
,
t
),
primaryTextTheme:
TextTheme
.
lerp
(
a
.
primaryTextTheme
,
b
.
primaryTextTheme
,
t
),
textTheme:
TextTheme
.
lerp
(
a
.
textTheme
,
b
.
textTheme
,
t
),
typography:
Typography
.
lerp
(
a
.
typography
,
b
.
typography
,
t
),
// COMPONENT THEMES
// COMPONENT THEMES
appBarTheme:
AppBarTheme
.
lerp
(
a
.
appBarTheme
,
b
.
appBarTheme
,
t
),
appBarTheme:
AppBarTheme
.
lerp
(
a
.
appBarTheme
,
b
.
appBarTheme
,
t
),
bannerTheme:
MaterialBannerThemeData
.
lerp
(
a
.
bannerTheme
,
b
.
bannerTheme
,
t
),
bannerTheme:
MaterialBannerThemeData
.
lerp
(
a
.
bannerTheme
,
b
.
bannerTheme
,
t
),
...
@@ -1982,6 +2007,7 @@ class ThemeData with Diagnosticable {
...
@@ -1982,6 +2007,7 @@ class ThemeData with Diagnosticable {
dividerTheme:
DividerThemeData
.
lerp
(
a
.
dividerTheme
,
b
.
dividerTheme
,
t
),
dividerTheme:
DividerThemeData
.
lerp
(
a
.
dividerTheme
,
b
.
dividerTheme
,
t
),
drawerTheme:
DrawerThemeData
.
lerp
(
a
.
drawerTheme
,
b
.
drawerTheme
,
t
)!,
drawerTheme:
DrawerThemeData
.
lerp
(
a
.
drawerTheme
,
b
.
drawerTheme
,
t
)!,
elevatedButtonTheme:
ElevatedButtonThemeData
.
lerp
(
a
.
elevatedButtonTheme
,
b
.
elevatedButtonTheme
,
t
)!,
elevatedButtonTheme:
ElevatedButtonThemeData
.
lerp
(
a
.
elevatedButtonTheme
,
b
.
elevatedButtonTheme
,
t
)!,
expansionTileTheme:
ExpansionTileThemeData
.
lerp
(
a
.
expansionTileTheme
,
b
.
expansionTileTheme
,
t
)!,
floatingActionButtonTheme:
FloatingActionButtonThemeData
.
lerp
(
a
.
floatingActionButtonTheme
,
b
.
floatingActionButtonTheme
,
t
)!,
floatingActionButtonTheme:
FloatingActionButtonThemeData
.
lerp
(
a
.
floatingActionButtonTheme
,
b
.
floatingActionButtonTheme
,
t
)!,
listTileTheme:
ListTileThemeData
.
lerp
(
a
.
listTileTheme
,
b
.
listTileTheme
,
t
)!,
listTileTheme:
ListTileThemeData
.
lerp
(
a
.
listTileTheme
,
b
.
listTileTheme
,
t
)!,
navigationBarTheme:
NavigationBarThemeData
.
lerp
(
a
.
navigationBarTheme
,
b
.
navigationBarTheme
,
t
)!,
navigationBarTheme:
NavigationBarThemeData
.
lerp
(
a
.
navigationBarTheme
,
b
.
navigationBarTheme
,
t
)!,
...
@@ -1999,7 +2025,6 @@ class ThemeData with Diagnosticable {
...
@@ -1999,7 +2025,6 @@ class ThemeData with Diagnosticable {
timePickerTheme:
TimePickerThemeData
.
lerp
(
a
.
timePickerTheme
,
b
.
timePickerTheme
,
t
),
timePickerTheme:
TimePickerThemeData
.
lerp
(
a
.
timePickerTheme
,
b
.
timePickerTheme
,
t
),
toggleButtonsTheme:
ToggleButtonsThemeData
.
lerp
(
a
.
toggleButtonsTheme
,
b
.
toggleButtonsTheme
,
t
)!,
toggleButtonsTheme:
ToggleButtonsThemeData
.
lerp
(
a
.
toggleButtonsTheme
,
b
.
toggleButtonsTheme
,
t
)!,
tooltipTheme:
TooltipThemeData
.
lerp
(
a
.
tooltipTheme
,
b
.
tooltipTheme
,
t
)!,
tooltipTheme:
TooltipThemeData
.
lerp
(
a
.
tooltipTheme
,
b
.
tooltipTheme
,
t
)!,
expansionTileTheme:
ExpansionTileThemeData
.
lerp
(
a
.
expansionTileTheme
,
b
.
expansionTileTheme
,
t
)!,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
accentColor:
Color
.
lerp
(
a
.
accentColor
,
b
.
accentColor
,
t
),
accentColor:
Color
.
lerp
(
a
.
accentColor
,
b
.
accentColor
,
t
),
accentColorBrightness:
t
<
0.5
?
a
.
accentColorBrightness
:
b
.
accentColorBrightness
,
accentColorBrightness:
t
<
0.5
?
a
.
accentColorBrightness
:
b
.
accentColorBrightness
,
...
@@ -2016,10 +2041,12 @@ class ThemeData with Diagnosticable {
...
@@ -2016,10 +2041,12 @@ class ThemeData with Diagnosticable {
bool
operator
==(
Object
other
)
{
bool
operator
==(
Object
other
)
{
if
(
other
.
runtimeType
!=
runtimeType
)
if
(
other
.
runtimeType
!=
runtimeType
)
return
false
;
return
false
;
// Warning: make sure these properties are in the exact same order as in
// Object.hash() and in the raw constructor and in the order of fields in
// the class and in the lerp() method.
return
other
is
ThemeData
&&
return
other
is
ThemeData
&&
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
other
.
applyElevationOverlayColor
==
applyElevationOverlayColor
&&
other
.
applyElevationOverlayColor
==
applyElevationOverlayColor
&&
other
.
cupertinoOverrideTheme
==
cupertinoOverrideTheme
&&
other
.
cupertinoOverrideTheme
==
cupertinoOverrideTheme
&&
...
@@ -2030,39 +2057,39 @@ class ThemeData with Diagnosticable {
...
@@ -2030,39 +2057,39 @@ class ThemeData with Diagnosticable {
other
.
platform
==
platform
&&
other
.
platform
==
platform
&&
other
.
scrollbarTheme
==
scrollbarTheme
&&
other
.
scrollbarTheme
==
scrollbarTheme
&&
other
.
splashFactory
==
splashFactory
&&
other
.
splashFactory
==
splashFactory
&&
other
.
visualDensity
==
visualDensity
&&
other
.
useMaterial3
==
useMaterial3
&&
other
.
useMaterial3
==
useMaterial3
&&
other
.
visualDensity
==
visualDensity
&&
// COLOR
// COLOR
other
.
colorScheme
==
colorScheme
&&
other
.
backgroundColor
==
backgroundColor
&&
other
.
primaryColor
==
primaryColor
&&
other
.
primaryColorLight
==
primaryColorLight
&&
other
.
primaryColorDark
==
primaryColorDark
&&
other
.
focusColor
==
focusColor
&&
other
.
hoverColor
==
hoverColor
&&
other
.
shadowColor
==
shadowColor
&&
other
.
canvasColor
==
canvasColor
&&
other
.
scaffoldBackgroundColor
==
scaffoldBackgroundColor
&&
other
.
bottomAppBarColor
==
bottomAppBarColor
&&
other
.
bottomAppBarColor
==
bottomAppBarColor
&&
other
.
canvasColor
==
canvasColor
&&
other
.
cardColor
==
cardColor
&&
other
.
cardColor
==
cardColor
&&
other
.
colorScheme
==
colorScheme
&&
other
.
dialogBackgroundColor
==
dialogBackgroundColor
&&
other
.
disabledColor
==
disabledColor
&&
other
.
dividerColor
==
dividerColor
&&
other
.
dividerColor
==
dividerColor
&&
other
.
errorColor
==
errorColor
&&
other
.
focusColor
==
focusColor
&&
other
.
highlightColor
==
highlightColor
&&
other
.
highlightColor
==
highlightColor
&&
other
.
splashColor
==
splashColor
&&
other
.
selectedRowColor
==
selectedRowColor
&&
other
.
unselectedWidgetColor
==
unselectedWidgetColor
&&
other
.
disabledColor
==
disabledColor
&&
other
.
secondaryHeaderColor
==
secondaryHeaderColor
&&
other
.
backgroundColor
==
backgroundColor
&&
other
.
dialogBackgroundColor
==
dialogBackgroundColor
&&
other
.
indicatorColor
==
indicatorColor
&&
other
.
hintColor
==
hintColor
&&
other
.
hintColor
==
hintColor
&&
other
.
errorColor
==
errorColor
&&
other
.
hoverColor
==
hoverColor
&&
other
.
indicatorColor
==
indicatorColor
&&
other
.
primaryColor
==
primaryColor
&&
other
.
primaryColorDark
==
primaryColorDark
&&
other
.
primaryColorLight
==
primaryColorLight
&&
other
.
scaffoldBackgroundColor
==
scaffoldBackgroundColor
&&
other
.
secondaryHeaderColor
==
secondaryHeaderColor
&&
other
.
selectedRowColor
==
selectedRowColor
&&
other
.
shadowColor
==
shadowColor
&&
other
.
splashColor
==
splashColor
&&
other
.
toggleableActiveColor
==
toggleableActiveColor
&&
other
.
toggleableActiveColor
==
toggleableActiveColor
&&
other
.
unselectedWidgetColor
==
unselectedWidgetColor
&&
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
other
.
typography
==
typography
&&
other
.
textTheme
==
textTheme
&&
other
.
primaryTextTheme
==
primaryTextTheme
&&
other
.
iconTheme
==
iconTheme
&&
other
.
iconTheme
==
iconTheme
&&
other
.
primaryIconTheme
==
primaryIconTheme
&&
other
.
primaryIconTheme
==
primaryIconTheme
&&
other
.
primaryTextTheme
==
primaryTextTheme
&&
other
.
textTheme
==
textTheme
&&
other
.
typography
==
typography
&&
// COMPONENT THEMES
// COMPONENT THEMES
other
.
appBarTheme
==
appBarTheme
&&
other
.
appBarTheme
==
appBarTheme
&&
other
.
bannerTheme
==
bannerTheme
&&
other
.
bannerTheme
==
bannerTheme
&&
...
@@ -2079,6 +2106,7 @@ class ThemeData with Diagnosticable {
...
@@ -2079,6 +2106,7 @@ class ThemeData with Diagnosticable {
other
.
dividerTheme
==
dividerTheme
&&
other
.
dividerTheme
==
dividerTheme
&&
other
.
drawerTheme
==
drawerTheme
&&
other
.
drawerTheme
==
drawerTheme
&&
other
.
elevatedButtonTheme
==
elevatedButtonTheme
&&
other
.
elevatedButtonTheme
==
elevatedButtonTheme
&&
other
.
expansionTileTheme
==
expansionTileTheme
&&
other
.
floatingActionButtonTheme
==
floatingActionButtonTheme
&&
other
.
floatingActionButtonTheme
==
floatingActionButtonTheme
&&
other
.
listTileTheme
==
listTileTheme
&&
other
.
listTileTheme
==
listTileTheme
&&
other
.
navigationBarTheme
==
navigationBarTheme
&&
other
.
navigationBarTheme
==
navigationBarTheme
&&
...
@@ -2096,7 +2124,6 @@ class ThemeData with Diagnosticable {
...
@@ -2096,7 +2124,6 @@ class ThemeData with Diagnosticable {
other
.
timePickerTheme
==
timePickerTheme
&&
other
.
timePickerTheme
==
timePickerTheme
&&
other
.
toggleButtonsTheme
==
toggleButtonsTheme
&&
other
.
toggleButtonsTheme
==
toggleButtonsTheme
&&
other
.
tooltipTheme
==
tooltipTheme
&&
other
.
tooltipTheme
==
tooltipTheme
&&
other
.
expansionTileTheme
==
expansionTileTheme
&&
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
other
.
accentColor
==
accentColor
&&
other
.
accentColor
==
accentColor
&&
other
.
accentColorBrightness
==
accentColorBrightness
&&
other
.
accentColorBrightness
==
accentColorBrightness
&&
...
@@ -2110,10 +2137,12 @@ class ThemeData with Diagnosticable {
...
@@ -2110,10 +2137,12 @@ class ThemeData with Diagnosticable {
@override
@override
int
get
hashCode
{
int
get
hashCode
{
// Warning: For the sanity of the reader, please make sure these properties
// are in the exact same order as in operator == and in the raw constructor
// and in the order of fields in the class and in the lerp() method.
final
List
<
Object
?>
values
=
<
Object
?>[
final
List
<
Object
?>
values
=
<
Object
?>[
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
applyElevationOverlayColor
,
applyElevationOverlayColor
,
cupertinoOverrideTheme
,
cupertinoOverrideTheme
,
...
@@ -2125,39 +2154,39 @@ class ThemeData with Diagnosticable {
...
@@ -2125,39 +2154,39 @@ class ThemeData with Diagnosticable {
platform
,
platform
,
scrollbarTheme
,
scrollbarTheme
,
splashFactory
,
splashFactory
,
visualDensity
,
useMaterial3
,
useMaterial3
,
visualDensity
,
// COLOR
// COLOR
colorScheme
,
backgroundColor
,
primaryColor
,
primaryColorLight
,
primaryColorDark
,
focusColor
,
hoverColor
,
shadowColor
,
canvasColor
,
scaffoldBackgroundColor
,
bottomAppBarColor
,
bottomAppBarColor
,
canvasColor
,
cardColor
,
cardColor
,
colorScheme
,
dialogBackgroundColor
,
disabledColor
,
dividerColor
,
dividerColor
,
errorColor
,
focusColor
,
highlightColor
,
highlightColor
,
splashColor
,
selectedRowColor
,
unselectedWidgetColor
,
disabledColor
,
secondaryHeaderColor
,
backgroundColor
,
dialogBackgroundColor
,
indicatorColor
,
hintColor
,
hintColor
,
errorColor
,
hoverColor
,
indicatorColor
,
primaryColor
,
primaryColorDark
,
primaryColorLight
,
scaffoldBackgroundColor
,
secondaryHeaderColor
,
selectedRowColor
,
shadowColor
,
splashColor
,
toggleableActiveColor
,
toggleableActiveColor
,
unselectedWidgetColor
,
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
typography
,
textTheme
,
primaryTextTheme
,
iconTheme
,
iconTheme
,
primaryIconTheme
,
primaryIconTheme
,
primaryTextTheme
,
textTheme
,
typography
,
// COMPONENT THEMES
// COMPONENT THEMES
appBarTheme
,
appBarTheme
,
bannerTheme
,
bannerTheme
,
...
@@ -2174,6 +2203,7 @@ class ThemeData with Diagnosticable {
...
@@ -2174,6 +2203,7 @@ class ThemeData with Diagnosticable {
dividerTheme
,
dividerTheme
,
drawerTheme
,
drawerTheme
,
elevatedButtonTheme
,
elevatedButtonTheme
,
expansionTileTheme
,
floatingActionButtonTheme
,
floatingActionButtonTheme
,
listTileTheme
,
listTileTheme
,
navigationBarTheme
,
navigationBarTheme
,
...
@@ -2191,7 +2221,6 @@ class ThemeData with Diagnosticable {
...
@@ -2191,7 +2221,6 @@ class ThemeData with Diagnosticable {
timePickerTheme
,
timePickerTheme
,
toggleButtonsTheme
,
toggleButtonsTheme
,
tooltipTheme
,
tooltipTheme
,
expansionTileTheme
,
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
accentColor
,
accentColor
,
accentColorBrightness
,
accentColorBrightness
,
...
@@ -2209,6 +2238,11 @@ class ThemeData with Diagnosticable {
...
@@ -2209,6 +2238,11 @@ class ThemeData with Diagnosticable {
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
super
.
debugFillProperties
(
properties
);
super
.
debugFillProperties
(
properties
);
final
ThemeData
defaultData
=
ThemeData
.
fallback
();
final
ThemeData
defaultData
=
ThemeData
.
fallback
();
// For the sanity of the reader, make sure these properties are in the same
// order in every place that they are separated by section comments (e.g.
// GENERAL CONFIGURATION). Each section except for deprecations should be
// alphabetical by symbol name.
// GENERAL CONFIGURATION
// GENERAL CONFIGURATION
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'applyElevationOverlayColor'
,
applyElevationOverlayColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'applyElevationOverlayColor'
,
applyElevationOverlayColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
NoDefaultCupertinoThemeData
>(
'cupertinoOverrideTheme'
,
cupertinoOverrideTheme
,
defaultValue:
defaultData
.
cupertinoOverrideTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
NoDefaultCupertinoThemeData
>(
'cupertinoOverrideTheme'
,
cupertinoOverrideTheme
,
defaultValue:
defaultData
.
cupertinoOverrideTheme
,
level:
DiagnosticLevel
.
debug
));
...
@@ -2219,39 +2253,39 @@ class ThemeData with Diagnosticable {
...
@@ -2219,39 +2253,39 @@ class ThemeData with Diagnosticable {
properties
.
add
(
EnumProperty
<
TargetPlatform
>(
'platform'
,
platform
,
defaultValue:
defaultTargetPlatform
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
EnumProperty
<
TargetPlatform
>(
'platform'
,
platform
,
defaultValue:
defaultTargetPlatform
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ScrollbarThemeData
>(
'scrollbarTheme'
,
scrollbarTheme
,
defaultValue:
defaultData
.
scrollbarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ScrollbarThemeData
>(
'scrollbarTheme'
,
scrollbarTheme
,
defaultValue:
defaultData
.
scrollbarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
InteractiveInkFeatureFactory
>(
'splashFactory'
,
splashFactory
,
defaultValue:
defaultData
.
splashFactory
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
InteractiveInkFeatureFactory
>(
'splashFactory'
,
splashFactory
,
defaultValue:
defaultData
.
splashFactory
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
VisualDensity
>(
'visualDensity'
,
visualDensity
,
defaultValue:
defaultData
.
visualDensity
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'useMaterial3'
,
useMaterial3
,
defaultValue:
defaultData
.
useMaterial3
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'useMaterial3'
,
useMaterial3
,
defaultValue:
defaultData
.
useMaterial3
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
VisualDensity
>(
'visualDensity'
,
visualDensity
,
defaultValue:
defaultData
.
visualDensity
,
level:
DiagnosticLevel
.
debug
));
// COLORS
// COLORS
properties
.
add
(
DiagnosticsProperty
<
ColorScheme
>(
'colorScheme'
,
colorScheme
,
defaultValue:
defaultData
.
colorScheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'backgroundColor'
,
backgroundColor
,
defaultValue:
defaultData
.
backgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColor'
,
primaryColor
,
defaultValue:
defaultData
.
primaryColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColorLight'
,
primaryColorLight
,
defaultValue:
defaultData
.
primaryColorLight
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColorDark'
,
primaryColorDark
,
defaultValue:
defaultData
.
primaryColorDark
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'focusColor'
,
focusColor
,
defaultValue:
defaultData
.
focusColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'hoverColor'
,
hoverColor
,
defaultValue:
defaultData
.
hoverColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'shadowColor'
,
shadowColor
,
defaultValue:
defaultData
.
shadowColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'canvasColor'
,
canvasColor
,
defaultValue:
defaultData
.
canvasColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'scaffoldBackgroundColor'
,
scaffoldBackgroundColor
,
defaultValue:
defaultData
.
scaffoldBackgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'bottomAppBarColor'
,
bottomAppBarColor
,
defaultValue:
defaultData
.
bottomAppBarColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'bottomAppBarColor'
,
bottomAppBarColor
,
defaultValue:
defaultData
.
bottomAppBarColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'canvasColor'
,
canvasColor
,
defaultValue:
defaultData
.
canvasColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'cardColor'
,
cardColor
,
defaultValue:
defaultData
.
cardColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'cardColor'
,
cardColor
,
defaultValue:
defaultData
.
cardColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ColorScheme
>(
'colorScheme'
,
colorScheme
,
defaultValue:
defaultData
.
colorScheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'dialogBackgroundColor'
,
dialogBackgroundColor
,
defaultValue:
defaultData
.
dialogBackgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'disabledColor'
,
disabledColor
,
defaultValue:
defaultData
.
disabledColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'dividerColor'
,
dividerColor
,
defaultValue:
defaultData
.
dividerColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'dividerColor'
,
dividerColor
,
defaultValue:
defaultData
.
dividerColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'errorColor'
,
errorColor
,
defaultValue:
defaultData
.
errorColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'focusColor'
,
focusColor
,
defaultValue:
defaultData
.
focusColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'highlightColor'
,
highlightColor
,
defaultValue:
defaultData
.
highlightColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'highlightColor'
,
highlightColor
,
defaultValue:
defaultData
.
highlightColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'splashColor'
,
splashColor
,
defaultValue:
defaultData
.
splashColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'selectedRowColor'
,
selectedRowColor
,
defaultValue:
defaultData
.
selectedRowColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'unselectedWidgetColor'
,
unselectedWidgetColor
,
defaultValue:
defaultData
.
unselectedWidgetColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'disabledColor'
,
disabledColor
,
defaultValue:
defaultData
.
disabledColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'secondaryHeaderColor'
,
secondaryHeaderColor
,
defaultValue:
defaultData
.
secondaryHeaderColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'backgroundColor'
,
backgroundColor
,
defaultValue:
defaultData
.
backgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'dialogBackgroundColor'
,
dialogBackgroundColor
,
defaultValue:
defaultData
.
dialogBackgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'indicatorColor'
,
indicatorColor
,
defaultValue:
defaultData
.
indicatorColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'hintColor'
,
hintColor
,
defaultValue:
defaultData
.
hintColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'hintColor'
,
hintColor
,
defaultValue:
defaultData
.
hintColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'errorColor'
,
errorColor
,
defaultValue:
defaultData
.
errorColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'hoverColor'
,
hoverColor
,
defaultValue:
defaultData
.
hoverColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'indicatorColor'
,
indicatorColor
,
defaultValue:
defaultData
.
indicatorColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColorDark'
,
primaryColorDark
,
defaultValue:
defaultData
.
primaryColorDark
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColorLight'
,
primaryColorLight
,
defaultValue:
defaultData
.
primaryColorLight
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'primaryColor'
,
primaryColor
,
defaultValue:
defaultData
.
primaryColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'scaffoldBackgroundColor'
,
scaffoldBackgroundColor
,
defaultValue:
defaultData
.
scaffoldBackgroundColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'secondaryHeaderColor'
,
secondaryHeaderColor
,
defaultValue:
defaultData
.
secondaryHeaderColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'selectedRowColor'
,
selectedRowColor
,
defaultValue:
defaultData
.
selectedRowColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'shadowColor'
,
shadowColor
,
defaultValue:
defaultData
.
shadowColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'splashColor'
,
splashColor
,
defaultValue:
defaultData
.
splashColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'toggleableActiveColor'
,
toggleableActiveColor
,
defaultValue:
defaultData
.
toggleableActiveColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'toggleableActiveColor'
,
toggleableActiveColor
,
defaultValue:
defaultData
.
toggleableActiveColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'unselectedWidgetColor'
,
unselectedWidgetColor
,
defaultValue:
defaultData
.
unselectedWidgetColor
,
level:
DiagnosticLevel
.
debug
));
// TYPOGRAPHY & ICONOGRAPHY
// TYPOGRAPHY & ICONOGRAPHY
properties
.
add
(
DiagnosticsProperty
<
Typography
>(
'typography'
,
typography
,
defaultValue:
defaultData
.
typography
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextTheme
>(
'textTheme'
,
textTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextTheme
>(
'primaryTextTheme'
,
primaryTextTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
IconThemeData
>(
'iconTheme'
,
iconTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
IconThemeData
>(
'iconTheme'
,
iconTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
IconThemeData
>(
'primaryIconTheme'
,
primaryIconTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
IconThemeData
>(
'primaryIconTheme'
,
primaryIconTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextTheme
>(
'primaryTextTheme'
,
primaryTextTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextTheme
>(
'textTheme'
,
textTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
Typography
>(
'typography'
,
typography
,
defaultValue:
defaultData
.
typography
,
level:
DiagnosticLevel
.
debug
));
// COMPONENT THEMES
// COMPONENT THEMES
properties
.
add
(
DiagnosticsProperty
<
AppBarTheme
>(
'appBarTheme'
,
appBarTheme
,
defaultValue:
defaultData
.
appBarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
AppBarTheme
>(
'appBarTheme'
,
appBarTheme
,
defaultValue:
defaultData
.
appBarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
MaterialBannerThemeData
>(
'bannerTheme'
,
bannerTheme
,
defaultValue:
defaultData
.
bannerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
MaterialBannerThemeData
>(
'bannerTheme'
,
bannerTheme
,
defaultValue:
defaultData
.
bannerTheme
,
level:
DiagnosticLevel
.
debug
));
...
@@ -2268,6 +2302,7 @@ class ThemeData with Diagnosticable {
...
@@ -2268,6 +2302,7 @@ class ThemeData with Diagnosticable {
properties
.
add
(
DiagnosticsProperty
<
DividerThemeData
>(
'dividerTheme'
,
dividerTheme
,
defaultValue:
defaultData
.
dividerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
DividerThemeData
>(
'dividerTheme'
,
dividerTheme
,
defaultValue:
defaultData
.
dividerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
DrawerThemeData
>(
'drawerTheme'
,
drawerTheme
,
defaultValue:
defaultData
.
drawerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
DrawerThemeData
>(
'drawerTheme'
,
drawerTheme
,
defaultValue:
defaultData
.
drawerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ElevatedButtonThemeData
>(
'elevatedButtonTheme'
,
elevatedButtonTheme
,
defaultValue:
defaultData
.
elevatedButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ElevatedButtonThemeData
>(
'elevatedButtonTheme'
,
elevatedButtonTheme
,
defaultValue:
defaultData
.
elevatedButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ExpansionTileThemeData
>(
'expansionTileTheme'
,
expansionTileTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
FloatingActionButtonThemeData
>(
'floatingActionButtonTheme'
,
floatingActionButtonTheme
,
defaultValue:
defaultData
.
floatingActionButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
FloatingActionButtonThemeData
>(
'floatingActionButtonTheme'
,
floatingActionButtonTheme
,
defaultValue:
defaultData
.
floatingActionButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ListTileThemeData
>(
'listTileTheme'
,
listTileTheme
,
defaultValue:
defaultData
.
listTileTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ListTileThemeData
>(
'listTileTheme'
,
listTileTheme
,
defaultValue:
defaultData
.
listTileTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
NavigationBarThemeData
>(
'navigationBarTheme'
,
navigationBarTheme
,
defaultValue:
defaultData
.
navigationBarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
NavigationBarThemeData
>(
'navigationBarTheme'
,
navigationBarTheme
,
defaultValue:
defaultData
.
navigationBarTheme
,
level:
DiagnosticLevel
.
debug
));
...
@@ -2285,7 +2320,6 @@ class ThemeData with Diagnosticable {
...
@@ -2285,7 +2320,6 @@ class ThemeData with Diagnosticable {
properties
.
add
(
DiagnosticsProperty
<
TimePickerThemeData
>(
'timePickerTheme'
,
timePickerTheme
,
defaultValue:
defaultData
.
timePickerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TimePickerThemeData
>(
'timePickerTheme'
,
timePickerTheme
,
defaultValue:
defaultData
.
timePickerTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ToggleButtonsThemeData
>(
'toggleButtonsTheme'
,
toggleButtonsTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ToggleButtonsThemeData
>(
'toggleButtonsTheme'
,
toggleButtonsTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TooltipThemeData
>(
'tooltipTheme'
,
tooltipTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TooltipThemeData
>(
'tooltipTheme'
,
tooltipTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ExpansionTileThemeData
>(
'expansionTileTheme'
,
expansionTileTheme
,
level:
DiagnosticLevel
.
debug
));
// DEPRECATED (newest deprecations at the bottom)
// DEPRECATED (newest deprecations at the bottom)
properties
.
add
(
ColorProperty
(
'accentColor'
,
accentColor
,
defaultValue:
defaultData
.
accentColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
ColorProperty
(
'accentColor'
,
accentColor
,
defaultValue:
defaultData
.
accentColor
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
EnumProperty
<
Brightness
>(
'accentColorBrightness'
,
accentColorBrightness
,
defaultValue:
defaultData
.
accentColorBrightness
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
EnumProperty
<
Brightness
>(
'accentColorBrightness'
,
accentColorBrightness
,
defaultValue:
defaultData
.
accentColorBrightness
,
level:
DiagnosticLevel
.
debug
));
...
...
packages/flutter/test/material/theme_data_test.dart
View file @
08496712
...
@@ -616,86 +616,96 @@ void main() {
...
@@ -616,86 +616,96 @@ void main() {
);
);
final
ThemeData
theme
=
ThemeData
.
raw
(
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
,
visualDensity:
VisualDensity
.
standard
,
primaryColor:
Colors
.
black
,
// COLOR
primaryColorBrightness:
Brightness
.
dark
,
backgroundColor:
Colors
.
black
,
primaryColorLight:
Colors
.
black
,
primaryColorDark:
Colors
.
black
,
accentColor:
Colors
.
black
,
accentColorBrightness:
Brightness
.
dark
,
canvasColor:
Colors
.
black
,
shadowColor:
Colors
.
black
,
scaffoldBackgroundColor:
Colors
.
black
,
bottomAppBarColor:
Colors
.
black
,
bottomAppBarColor:
Colors
.
black
,
canvasColor:
Colors
.
black
,
cardColor:
Colors
.
black
,
cardColor:
Colors
.
black
,
colorScheme:
const
ColorScheme
.
light
(),
dialogBackgroundColor:
Colors
.
black
,
disabledColor:
Colors
.
black
,
dividerColor:
Colors
.
black
,
dividerColor:
Colors
.
black
,
errorColor:
Colors
.
black
,
focusColor:
Colors
.
black
,
focusColor:
Colors
.
black
,
hoverColor:
Colors
.
black
,
highlightColor:
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
,
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
,
toggleableActiveColor:
Colors
.
black
,
textTheme:
ThemeData
.
dark
().
textTheme
,
unselectedWidgetColor:
Colors
.
black
,
primaryTextTheme:
ThemeData
.
dark
().
textTheme
,
// TYPOGRAPHY & ICONOGRAPHY
accentTextTheme:
ThemeData
.
dark
().
textTheme
,
inputDecorationTheme:
ThemeData
.
dark
().
inputDecorationTheme
.
copyWith
(
border:
const
OutlineInputBorder
()),
iconTheme:
ThemeData
.
dark
().
iconTheme
,
iconTheme:
ThemeData
.
dark
().
iconTheme
,
primaryIconTheme:
ThemeData
.
dark
().
iconTheme
,
primaryIconTheme:
ThemeData
.
dark
().
iconTheme
,
accentIconTheme:
ThemeData
.
dark
().
iconTheme
,
primaryTextTheme:
ThemeData
.
dark
().
textTheme
,
sliderTheme:
sliderTheme
,
textTheme:
ThemeData
.
dark
().
textTheme
,
tabBarTheme:
const
TabBarTheme
(
labelColor:
Colors
.
black
),
typography:
Typography
.
material2018
(),
tooltipTheme:
const
TooltipThemeData
(
height:
100
),
// COMPONENT THEMES
expansionTileTheme:
const
ExpansionTileThemeData
(
backgroundColor:
Colors
.
black
),
cardTheme:
const
CardTheme
(
color:
Colors
.
black
),
chipTheme:
chipTheme
,
platform:
TargetPlatform
.
iOS
,
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
applyElevationOverlayColor:
false
,
pageTransitionsTheme:
pageTransitionTheme
,
appBarTheme:
const
AppBarTheme
(
backgroundColor:
Colors
.
black
),
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
),
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
),
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
),
floatingActionButtonTheme:
const
FloatingActionButtonThemeData
(
backgroundColor:
Colors
.
black
),
listTileTheme:
const
ListTileThemeData
(),
navigationBarTheme:
const
NavigationBarThemeData
(
backgroundColor:
Colors
.
black
),
navigationBarTheme:
const
NavigationBarThemeData
(
backgroundColor:
Colors
.
black
),
navigationRailTheme:
const
NavigationRailThemeData
(
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
)),
outlinedButtonTheme:
OutlinedButtonThemeData
(
style:
OutlinedButton
.
styleFrom
(
primary:
Colors
.
blue
)),
textSelectionTheme:
const
TextSelectionThemeData
(
cursorColor:
Colors
.
black
),
popupMenuTheme:
const
PopupMenuThemeData
(
color:
Colors
.
black
),
dataTableTheme:
const
DataTableThemeData
(),
progressIndicatorTheme:
const
ProgressIndicatorThemeData
(),
checkboxTheme:
const
CheckboxThemeData
(),
radioTheme:
const
RadioThemeData
(),
radioTheme:
const
RadioThemeData
(),
sliderTheme:
sliderTheme
,
snackBarTheme:
const
SnackBarThemeData
(
backgroundColor:
Colors
.
black
),
switchTheme:
const
SwitchThemeData
(),
switchTheme:
const
SwitchThemeData
(),
progressIndicatorTheme:
const
ProgressIndicatorThemeData
(),
tabBarTheme:
const
TabBarTheme
(
labelColor:
Colors
.
black
),
drawerTheme:
const
DrawerThemeData
(),
textButtonTheme:
TextButtonThemeData
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
red
)),
listTileTheme:
const
ListTileThemeData
(),
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
,
fixTextFieldOutlineLabel:
false
,
extensions:
const
<
Object
,
ThemeExtension
<
dynamic
>>{}
,
primaryColorBrightness:
Brightness
.
dark
,
);
);
final
SliderThemeData
otherSliderTheme
=
SliderThemeData
.
fromPrimaryColors
(
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