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
e3f8ee88
Unverified
Commit
e3f8ee88
authored
Sep 09, 2022
by
Casey Hillers
Committed by
GitHub
Sep 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Update `MaterialBanner` to support Material 3" (#111288)
parent
bd73a6a3
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
400 deletions
+38
-400
gen_defaults.dart
dev/tools/gen_defaults/bin/gen_defaults.dart
+7
-9
banner_template.dart
dev/tools/gen_defaults/lib/banner_template.dart
+0
-31
chip_action_template.dart
dev/tools/gen_defaults/lib/chip_action_template.dart
+0
-0
chip_filter_template.dart
dev/tools/gen_defaults/lib/chip_filter_template.dart
+0
-0
chip_input_template.dart
dev/tools/gen_defaults/lib/chip_input_template.dart
+0
-0
banner.dart
packages/flutter/lib/src/material/banner.dart
+5
-89
banner_theme.dart
packages/flutter/lib/src/material/banner_theme.dart
+6
-36
banner_theme_test.dart
packages/flutter/test/material/banner_theme_test.dart
+20
-235
No files found.
dev/tools/gen_defaults/bin/gen_defaults.dart
View file @
e3f8ee88
...
@@ -17,17 +17,16 @@
...
@@ -17,17 +17,16 @@
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:io'
;
import
'package:gen_defaults/action_chip_template.dart'
;
import
'package:gen_defaults/app_bar_template.dart'
;
import
'package:gen_defaults/app_bar_template.dart'
;
import
'package:gen_defaults/banner_template.dart'
;
import
'package:gen_defaults/button_template.dart'
;
import
'package:gen_defaults/button_template.dart'
;
import
'package:gen_defaults/card_template.dart'
;
import
'package:gen_defaults/card_template.dart'
;
import
'package:gen_defaults/checkbox_template.dart'
;
import
'package:gen_defaults/checkbox_template.dart'
;
import
'package:gen_defaults/chip_action_template.dart'
;
import
'package:gen_defaults/chip_filter_template.dart'
;
import
'package:gen_defaults/chip_input_template.dart'
;
import
'package:gen_defaults/dialog_template.dart'
;
import
'package:gen_defaults/dialog_template.dart'
;
import
'package:gen_defaults/fab_template.dart'
;
import
'package:gen_defaults/fab_template.dart'
;
import
'package:gen_defaults/filter_chip_template.dart'
;
import
'package:gen_defaults/icon_button_template.dart'
;
import
'package:gen_defaults/icon_button_template.dart'
;
import
'package:gen_defaults/input_chip_template.dart'
;
import
'package:gen_defaults/input_decorator_template.dart'
;
import
'package:gen_defaults/input_decorator_template.dart'
;
import
'package:gen_defaults/navigation_bar_template.dart'
;
import
'package:gen_defaults/navigation_bar_template.dart'
;
import
'package:gen_defaults/navigation_rail_template.dart'
;
import
'package:gen_defaults/navigation_rail_template.dart'
;
...
@@ -104,7 +103,6 @@ Future<void> main(List<String> args) async {
...
@@ -104,7 +103,6 @@ Future<void> main(List<String> args) async {
tokens
[
'colorsDark'
]
=
_readTokenFile
(
'color_dark.json'
);
tokens
[
'colorsDark'
]
=
_readTokenFile
(
'color_dark.json'
);
AppBarTemplate
(
'AppBar'
,
'
$materialLib
/app_bar.dart'
,
tokens
).
updateFile
();
AppBarTemplate
(
'AppBar'
,
'
$materialLib
/app_bar.dart'
,
tokens
).
updateFile
();
BannerTemplate
(
'Banner'
,
'
$materialLib
/banner.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.elevated-button'
,
'ElevatedButton'
,
'
$materialLib
/elevated_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.elevated-button'
,
'ElevatedButton'
,
'
$materialLib
/elevated_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.filled-button'
,
'FilledButton'
,
'
$materialLib
/filled_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.filled-button'
,
'FilledButton'
,
'
$materialLib
/filled_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.filled-tonal-button'
,
'FilledTonalButton'
,
'
$materialLib
/filled_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.filled-tonal-button'
,
'FilledTonalButton'
,
'
$materialLib
/filled_button.dart'
,
tokens
).
updateFile
();
...
@@ -112,10 +110,10 @@ Future<void> main(List<String> args) async {
...
@@ -112,10 +110,10 @@ Future<void> main(List<String> args) async {
ButtonTemplate
(
'md.comp.text-button'
,
'TextButton'
,
'
$materialLib
/text_button.dart'
,
tokens
).
updateFile
();
ButtonTemplate
(
'md.comp.text-button'
,
'TextButton'
,
'
$materialLib
/text_button.dart'
,
tokens
).
updateFile
();
CardTemplate
(
'Card'
,
'
$materialLib
/card.dart'
,
tokens
).
updateFile
();
CardTemplate
(
'Card'
,
'
$materialLib
/card.dart'
,
tokens
).
updateFile
();
CheckboxTemplate
(
'Checkbox'
,
'
$materialLib
/checkbox.dart'
,
tokens
).
updateFile
();
CheckboxTemplate
(
'Checkbox'
,
'
$materialLib
/checkbox.dart'
,
tokens
).
updateFile
();
ChipActionTemplate
(
'ActionChip'
,
'
$materialLib
/
action_chip
.dart'
,
tokens
).
updateFile
();
ChipActionTemplate
(
'ActionChip'
,
'
$materialLib
/
chip_action
.dart'
,
tokens
).
updateFile
();
ChipFilterTemplate
(
'FilterChip'
,
'
$materialLib
/
filter_chip
.dart'
,
tokens
).
updateFile
();
ChipFilterTemplate
(
'FilterChip'
,
'
$materialLib
/
chip_filter
.dart'
,
tokens
).
updateFile
();
ChipFilterTemplate
(
'FilterChip'
,
'
$materialLib
/ch
oice_chip
.dart'
,
tokens
).
updateFile
();
ChipFilterTemplate
(
'FilterChip'
,
'
$materialLib
/ch
ip_choice
.dart'
,
tokens
).
updateFile
();
ChipInputTemplate
(
'InputChip'
,
'
$materialLib
/
input_chip
.dart'
,
tokens
).
updateFile
();
ChipInputTemplate
(
'InputChip'
,
'
$materialLib
/
chip_input
.dart'
,
tokens
).
updateFile
();
DialogTemplate
(
'Dialog'
,
'
$materialLib
/dialog.dart'
,
tokens
).
updateFile
();
DialogTemplate
(
'Dialog'
,
'
$materialLib
/dialog.dart'
,
tokens
).
updateFile
();
FABTemplate
(
'FAB'
,
'
$materialLib
/floating_action_button.dart'
,
tokens
).
updateFile
();
FABTemplate
(
'FAB'
,
'
$materialLib
/floating_action_button.dart'
,
tokens
).
updateFile
();
IconButtonTemplate
(
'IconButton'
,
'
$materialLib
/icon_button.dart'
,
tokens
).
updateFile
();
IconButtonTemplate
(
'IconButton'
,
'
$materialLib
/icon_button.dart'
,
tokens
).
updateFile
();
...
...
dev/tools/gen_defaults/lib/banner_template.dart
deleted
100644 → 0
View file @
bd73a6a3
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'template.dart'
;
class
BannerTemplate
extends
TokenTemplate
{
const
BannerTemplate
(
super
.
blockName
,
super
.
fileName
,
super
.
tokens
);
@override
String
generate
()
=>
'''
class _
${blockName}
DefaultsM3 extends MaterialBannerThemeData {
const _
${blockName}
DefaultsM3(this.context)
: super(elevation:
${elevation("md.comp.banner.container")}
);
final BuildContext context;
@override
Color? get backgroundColor =>
${componentColor("md.comp.banner.container")}
;
@override
Color? get surfaceTintColor =>
${color("md.comp.banner.container.surface-tint-layer.color")}
;
@override
Color? get dividerColor =>
${color("md.comp.banner.divider.color")}
;
@override
TextStyle? get contentTextStyle =>
${textStyle("md.comp.banner.supporting-text")}
;
}
'''
;
}
dev/tools/gen_defaults/lib/
action_chip
_template.dart
→
dev/tools/gen_defaults/lib/
chip_action
_template.dart
View file @
e3f8ee88
File moved
dev/tools/gen_defaults/lib/
filter_chip
_template.dart
→
dev/tools/gen_defaults/lib/
chip_filter
_template.dart
View file @
e3f8ee88
File moved
dev/tools/gen_defaults/lib/
input_chip
_template.dart
→
dev/tools/gen_defaults/lib/
chip_input
_template.dart
View file @
e3f8ee88
File moved
packages/flutter/lib/src/material/banner.dart
View file @
e3f8ee88
...
@@ -102,15 +102,12 @@ class MaterialBanner extends StatefulWidget {
...
@@ -102,15 +102,12 @@ class MaterialBanner extends StatefulWidget {
this
.
elevation
,
this
.
elevation
,
this
.
leading
,
this
.
leading
,
this
.
backgroundColor
,
this
.
backgroundColor
,
this
.
surfaceTintColor
,
this
.
shadowColor
,
this
.
dividerColor
,
this
.
padding
,
this
.
padding
,
this
.
leadingPadding
,
this
.
leadingPadding
,
this
.
forceActionsBelow
=
false
,
this
.
forceActionsBelow
=
false
,
this
.
overflowAlignment
=
OverflowBarAlignment
.
end
,
this
.
overflowAlignment
=
OverflowBarAlignment
.
end
,
this
.
animation
,
this
.
animation
,
this
.
onVisible
,
this
.
onVisible
})
:
assert
(
elevation
==
null
||
elevation
>=
0.0
),
})
:
assert
(
elevation
==
null
||
elevation
>=
0.0
),
assert
(
content
!=
null
),
assert
(
content
!=
null
),
assert
(
actions
!=
null
),
assert
(
actions
!=
null
),
...
@@ -156,29 +153,6 @@ class MaterialBanner extends StatefulWidget {
...
@@ -156,29 +153,6 @@ class MaterialBanner extends StatefulWidget {
/// also `null`, [ColorScheme.surface] of [ThemeData.colorScheme] is used.
/// also `null`, [ColorScheme.surface] of [ThemeData.colorScheme] is used.
final
Color
?
backgroundColor
;
final
Color
?
backgroundColor
;
/// The color used as an overlay on [backgroundColor] to indicate elevation.
///
/// If null, [MaterialBannerThemeData.surfaceTintColor] is used. If that
/// is also null, the default value is [ColorScheme.surfaceTint].
///
/// See [Material.surfaceTintColor] for more details on how this
/// overlay is applied.
final
Color
?
surfaceTintColor
;
/// The color of the shadow below the [MaterialBanner].
///
/// If this property is null, then [MaterialBannerThemeData.shadowColor] of
/// [ThemeData.bannerTheme] is used. If that is also null, the default value
/// is null.
final
Color
?
shadowColor
;
/// The color of the divider.
///
/// If this property is null, then [MaterialBannerThemeData.dividerColor] of
/// [ThemeData.bannerTheme] is used. If that is also null, the default value
/// is [ColorScheme.surfaceVariant].
final
Color
?
dividerColor
;
/// The amount of space by which to inset the [content].
/// The amount of space by which to inset the [content].
///
///
/// If the [actions] are below the [content], this defaults to
/// If the [actions] are below the [content], this defaults to
...
@@ -299,7 +273,6 @@ class _MaterialBannerState extends State<MaterialBanner> {
...
@@ -299,7 +273,6 @@ class _MaterialBannerState extends State<MaterialBanner> {
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
MaterialBannerThemeData
bannerTheme
=
MaterialBannerTheme
.
of
(
context
);
final
MaterialBannerThemeData
bannerTheme
=
MaterialBannerTheme
.
of
(
context
);
final
MaterialBannerThemeData
defaults
=
theme
.
useMaterial3
?
_BannerDefaultsM3
(
context
)
:
_BannerDefaultsM2
(
context
);
final
bool
isSingleRow
=
widget
.
actions
.
length
==
1
&&
!
widget
.
forceActionsBelow
;
final
bool
isSingleRow
=
widget
.
actions
.
length
==
1
&&
!
widget
.
forceActionsBelow
;
final
EdgeInsetsGeometry
padding
=
widget
.
padding
??
bannerTheme
.
padding
??
(
isSingleRow
final
EdgeInsetsGeometry
padding
=
widget
.
padding
??
bannerTheme
.
padding
??
(
isSingleRow
...
@@ -323,26 +296,16 @@ class _MaterialBannerState extends State<MaterialBanner> {
...
@@ -323,26 +296,16 @@ class _MaterialBannerState extends State<MaterialBanner> {
final
double
elevation
=
widget
.
elevation
??
bannerTheme
.
elevation
??
0.0
;
final
double
elevation
=
widget
.
elevation
??
bannerTheme
.
elevation
??
0.0
;
final
Color
backgroundColor
=
widget
.
backgroundColor
final
Color
backgroundColor
=
widget
.
backgroundColor
??
bannerTheme
.
backgroundColor
??
bannerTheme
.
backgroundColor
??
defaults
.
backgroundColor
!;
??
theme
.
colorScheme
.
surface
;
final
Color
?
surfaceTintColor
=
widget
.
surfaceTintColor
??
bannerTheme
.
surfaceTintColor
??
defaults
.
surfaceTintColor
;
final
Color
?
shadowColor
=
widget
.
shadowColor
??
bannerTheme
.
shadowColor
;
final
Color
?
dividerColor
=
widget
.
dividerColor
??
bannerTheme
.
dividerColor
??
defaults
.
dividerColor
;
final
TextStyle
?
textStyle
=
widget
.
contentTextStyle
final
TextStyle
?
textStyle
=
widget
.
contentTextStyle
??
bannerTheme
.
contentTextStyle
??
bannerTheme
.
contentTextStyle
??
defaults
.
contentTextStyle
;
??
theme
.
textTheme
.
bodyMedium
;
Widget
materialBanner
=
Container
(
Widget
materialBanner
=
Container
(
margin:
EdgeInsets
.
only
(
bottom:
elevation
>
0
?
10.0
:
0.0
),
margin:
EdgeInsets
.
only
(
bottom:
elevation
>
0
?
10.0
:
0.0
),
child:
Material
(
child:
Material
(
elevation:
elevation
,
elevation:
elevation
,
color:
backgroundColor
,
color:
backgroundColor
,
surfaceTintColor:
surfaceTintColor
,
shadowColor:
shadowColor
,
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
children:
<
Widget
>[
...
@@ -368,8 +331,9 @@ class _MaterialBannerState extends State<MaterialBanner> {
...
@@ -368,8 +331,9 @@ class _MaterialBannerState extends State<MaterialBanner> {
),
),
if
(!
isSingleRow
)
if
(!
isSingleRow
)
buttonBar
,
buttonBar
,
if
(
elevation
==
0
)
if
(
elevation
==
0
)
Divider
(
height:
0
,
color:
dividerColor
),
const
Divider
(
height:
0
),
],
],
),
),
),
),
...
@@ -430,51 +394,3 @@ class _MaterialBannerState extends State<MaterialBanner> {
...
@@ -430,51 +394,3 @@ class _MaterialBannerState extends State<MaterialBanner> {
);
);
}
}
}
}
class
_BannerDefaultsM2
extends
MaterialBannerThemeData
{
_BannerDefaultsM2
(
this
.
context
)
:
_theme
=
Theme
.
of
(
context
),
super
(
elevation:
0.0
);
final
BuildContext
context
;
final
ThemeData
_theme
;
@override
Color
?
get
backgroundColor
=>
_theme
.
colorScheme
.
surface
;
@override
Color
?
get
dividerColor
=>
Theme
.
of
(
context
).
colorScheme
.
surfaceVariant
;
@override
TextStyle
?
get
contentTextStyle
=>
_theme
.
textTheme
.
bodyText2
;
}
// BEGIN GENERATED TOKEN PROPERTIES - Banner
// Do not edit by hand. The code between the "BEGIN GENERATED" and
// "END GENERATED" comments are generated from data in the Material
// Design token database by the script:
// dev/tools/gen_defaults/bin/gen_defaults.dart.
// Token database version: v0_101
class
_BannerDefaultsM3
extends
MaterialBannerThemeData
{
const
_BannerDefaultsM3
(
this
.
context
)
:
super
(
elevation:
1.0
);
final
BuildContext
context
;
@override
Color
?
get
backgroundColor
=>
Theme
.
of
(
context
).
colorScheme
.
surface
;
@override
Color
?
get
surfaceTintColor
=>
Theme
.
of
(
context
).
colorScheme
.
surfaceTint
;
@override
Color
?
get
dividerColor
=>
Theme
.
of
(
context
).
colorScheme
.
surfaceVariant
;
@override
TextStyle
?
get
contentTextStyle
=>
Theme
.
of
(
context
).
textTheme
.
bodyMedium
;
}
// END GENERATED TOKEN PROPERTIES - Banner
packages/flutter/lib/src/material/banner_theme.dart
View file @
e3f8ee88
...
@@ -35,9 +35,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -35,9 +35,6 @@ class MaterialBannerThemeData with Diagnosticable {
/// [ThemeData.bannerTheme].
/// [ThemeData.bannerTheme].
const
MaterialBannerThemeData
({
const
MaterialBannerThemeData
({
this
.
backgroundColor
,
this
.
backgroundColor
,
this
.
surfaceTintColor
,
this
.
shadowColor
,
this
.
dividerColor
,
this
.
contentTextStyle
,
this
.
contentTextStyle
,
this
.
elevation
,
this
.
elevation
,
this
.
padding
,
this
.
padding
,
...
@@ -47,15 +44,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -47,15 +44,6 @@ class MaterialBannerThemeData with Diagnosticable {
/// The background color of a [MaterialBanner].
/// The background color of a [MaterialBanner].
final
Color
?
backgroundColor
;
final
Color
?
backgroundColor
;
/// Overrides the default value of [MaterialBanner.surfaceTintColor].
final
Color
?
surfaceTintColor
;
/// Overrides the default value of [MaterialBanner.shadowColor].
final
Color
?
shadowColor
;
/// Overrides the default value of [MaterialBanner.dividerColor].
final
Color
?
dividerColor
;
/// Used to configure the [DefaultTextStyle] for the [MaterialBanner.content]
/// Used to configure the [DefaultTextStyle] for the [MaterialBanner.content]
/// widget.
/// widget.
final
TextStyle
?
contentTextStyle
;
final
TextStyle
?
contentTextStyle
;
...
@@ -75,9 +63,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -75,9 +63,6 @@ class MaterialBannerThemeData with Diagnosticable {
/// new values.
/// new values.
MaterialBannerThemeData
copyWith
({
MaterialBannerThemeData
copyWith
({
Color
?
backgroundColor
,
Color
?
backgroundColor
,
Color
?
surfaceTintColor
,
Color
?
shadowColor
,
Color
?
dividerColor
,
TextStyle
?
contentTextStyle
,
TextStyle
?
contentTextStyle
,
double
?
elevation
,
double
?
elevation
,
EdgeInsetsGeometry
?
padding
,
EdgeInsetsGeometry
?
padding
,
...
@@ -85,9 +70,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -85,9 +70,6 @@ class MaterialBannerThemeData with Diagnosticable {
})
{
})
{
return
MaterialBannerThemeData
(
return
MaterialBannerThemeData
(
backgroundColor:
backgroundColor
??
this
.
backgroundColor
,
backgroundColor:
backgroundColor
??
this
.
backgroundColor
,
surfaceTintColor:
surfaceTintColor
??
this
.
surfaceTintColor
,
shadowColor:
shadowColor
??
this
.
shadowColor
,
dividerColor:
dividerColor
??
this
.
dividerColor
,
contentTextStyle:
contentTextStyle
??
this
.
contentTextStyle
,
contentTextStyle:
contentTextStyle
??
this
.
contentTextStyle
,
elevation:
elevation
??
this
.
elevation
,
elevation:
elevation
??
this
.
elevation
,
padding:
padding
??
this
.
padding
,
padding:
padding
??
this
.
padding
,
...
@@ -104,9 +86,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -104,9 +86,6 @@ class MaterialBannerThemeData with Diagnosticable {
assert
(
t
!=
null
);
assert
(
t
!=
null
);
return
MaterialBannerThemeData
(
return
MaterialBannerThemeData
(
backgroundColor:
Color
.
lerp
(
a
?.
backgroundColor
,
b
?.
backgroundColor
,
t
),
backgroundColor:
Color
.
lerp
(
a
?.
backgroundColor
,
b
?.
backgroundColor
,
t
),
surfaceTintColor:
Color
.
lerp
(
a
?.
surfaceTintColor
,
b
?.
surfaceTintColor
,
t
),
shadowColor:
Color
.
lerp
(
a
?.
shadowColor
,
b
?.
shadowColor
,
t
),
dividerColor:
Color
.
lerp
(
a
?.
dividerColor
,
b
?.
dividerColor
,
t
),
contentTextStyle:
TextStyle
.
lerp
(
a
?.
contentTextStyle
,
b
?.
contentTextStyle
,
t
),
contentTextStyle:
TextStyle
.
lerp
(
a
?.
contentTextStyle
,
b
?.
contentTextStyle
,
t
),
elevation:
lerpDouble
(
a
?.
elevation
,
b
?.
elevation
,
t
),
elevation:
lerpDouble
(
a
?.
elevation
,
b
?.
elevation
,
t
),
padding:
EdgeInsetsGeometry
.
lerp
(
a
?.
padding
,
b
?.
padding
,
t
),
padding:
EdgeInsetsGeometry
.
lerp
(
a
?.
padding
,
b
?.
padding
,
t
),
...
@@ -117,9 +96,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -117,9 +96,6 @@ class MaterialBannerThemeData with Diagnosticable {
@override
@override
int
get
hashCode
=>
Object
.
hash
(
int
get
hashCode
=>
Object
.
hash
(
backgroundColor
,
backgroundColor
,
surfaceTintColor
,
shadowColor
,
dividerColor
,
contentTextStyle
,
contentTextStyle
,
elevation
,
elevation
,
padding
,
padding
,
...
@@ -136,9 +112,6 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -136,9 +112,6 @@ class MaterialBannerThemeData with Diagnosticable {
}
}
return
other
is
MaterialBannerThemeData
return
other
is
MaterialBannerThemeData
&&
other
.
backgroundColor
==
backgroundColor
&&
other
.
backgroundColor
==
backgroundColor
&&
other
.
surfaceTintColor
==
surfaceTintColor
&&
other
.
shadowColor
==
shadowColor
&&
other
.
dividerColor
==
dividerColor
&&
other
.
contentTextStyle
==
contentTextStyle
&&
other
.
contentTextStyle
==
contentTextStyle
&&
other
.
elevation
==
elevation
&&
other
.
elevation
==
elevation
&&
other
.
padding
==
padding
&&
other
.
padding
==
padding
...
@@ -149,11 +122,8 @@ class MaterialBannerThemeData with Diagnosticable {
...
@@ -149,11 +122,8 @@ class MaterialBannerThemeData with Diagnosticable {
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
super
.
debugFillProperties
(
properties
);
super
.
debugFillProperties
(
properties
);
properties
.
add
(
ColorProperty
(
'backgroundColor'
,
backgroundColor
,
defaultValue:
null
));
properties
.
add
(
ColorProperty
(
'backgroundColor'
,
backgroundColor
,
defaultValue:
null
));
properties
.
add
(
ColorProperty
(
'surfaceTintColor'
,
surfaceTintColor
,
defaultValue:
null
));
properties
.
add
(
ColorProperty
(
'shadowColor'
,
shadowColor
,
defaultValue:
null
));
properties
.
add
(
ColorProperty
(
'dividerColor'
,
dividerColor
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'contentTextStyle'
,
contentTextStyle
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'contentTextStyle'
,
contentTextStyle
,
defaultValue:
null
));
properties
.
add
(
D
oubleProperty
(
'elevation'
,
elevation
,
defaultValue:
null
));
properties
.
add
(
D
iagnosticsProperty
<
double
>
(
'elevation'
,
elevation
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'padding'
,
padding
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'padding'
,
padding
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'leadingPadding'
,
leadingPadding
,
defaultValue:
null
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'leadingPadding'
,
leadingPadding
,
defaultValue:
null
));
}
}
...
...
packages/flutter/test/material/banner_theme_test.dart
View file @
e3f8ee88
This diff is collapsed.
Click to expand it.
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