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
eac17471
Unverified
Commit
eac17471
authored
Jul 11, 2020
by
Hans Muller
Committed by
GitHub
Jul 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed ContainedButton et al. to ElevatedButton et al. (#61262)
parent
aa012538
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
448 additions
and
153 deletions
+448
-153
material.dart
packages/flutter/lib/material.dart
+2
-2
button_style.dart
packages/flutter/lib/src/material/button_style.dart
+6
-6
button_style_button.dart
packages/flutter/lib/src/material/button_style_button.dart
+2
-2
elevated_button.dart
packages/flutter/lib/src/material/elevated_button.dart
+173
-38
elevated_button_theme.dart
packages/flutter/lib/src/material/elevated_button_theme.dart
+160
-0
outlined_button.dart
packages/flutter/lib/src/material/outlined_button.dart
+1
-1
outlined_button_theme.dart
packages/flutter/lib/src/material/outlined_button_theme.dart
+2
-2
text_button.dart
packages/flutter/lib/src/material/text_button.dart
+1
-1
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+14
-14
elevated_button_test.dart
packages/flutter/test/material/elevated_button_test.dart
+69
-69
elevated_button_theme_test.dart
...ges/flutter/test/material/elevated_button_theme_test.dart
+14
-14
theme_data_test.dart
packages/flutter/test/material/theme_data_test.dart
+4
-4
No files found.
packages/flutter/lib/material.dart
View file @
eac17471
...
@@ -49,8 +49,6 @@ export 'src/material/circle_avatar.dart';
...
@@ -49,8 +49,6 @@ export 'src/material/circle_avatar.dart';
export
'src/material/color_scheme.dart'
;
export
'src/material/color_scheme.dart'
;
export
'src/material/colors.dart'
;
export
'src/material/colors.dart'
;
export
'src/material/constants.dart'
;
export
'src/material/constants.dart'
;
export
'src/material/contained_button.dart'
;
export
'src/material/contained_button_theme.dart'
;
export
'src/material/data_table.dart'
;
export
'src/material/data_table.dart'
;
export
'src/material/data_table_source.dart'
;
export
'src/material/data_table_source.dart'
;
export
'src/material/debug.dart'
;
export
'src/material/debug.dart'
;
...
@@ -61,6 +59,8 @@ export 'src/material/divider_theme.dart';
...
@@ -61,6 +59,8 @@ export 'src/material/divider_theme.dart';
export
'src/material/drawer.dart'
;
export
'src/material/drawer.dart'
;
export
'src/material/drawer_header.dart'
;
export
'src/material/drawer_header.dart'
;
export
'src/material/dropdown.dart'
;
export
'src/material/dropdown.dart'
;
export
'src/material/elevated_button.dart'
;
export
'src/material/elevated_button_theme.dart'
;
export
'src/material/elevation_overlay.dart'
;
export
'src/material/elevation_overlay.dart'
;
export
'src/material/expand_icon.dart'
;
export
'src/material/expand_icon.dart'
;
export
'src/material/expansion_panel.dart'
;
export
'src/material/expansion_panel.dart'
;
...
...
packages/flutter/lib/src/material/button_style.dart
View file @
eac17471
...
@@ -29,12 +29,12 @@ import 'theme_data.dart';
...
@@ -29,12 +29,12 @@ import 'theme_data.dart';
/// hovered, focused, disabled, etc.
/// hovered, focused, disabled, etc.
///
///
/// These properties can override the default value for just one state or all of
/// These properties can override the default value for just one state or all of
/// them. For example to create a [
Contain
edButton] whose background color is the
/// them. For example to create a [
Elevat
edButton] whose background color is the
/// color scheme’s primary color with 50% opacity, but only when the button is
/// color scheme’s primary color with 50% opacity, but only when the button is
/// pressed, one could write:
/// pressed, one could write:
///
///
/// ```dart
/// ```dart
///
Contain
edButton(
///
Elevat
edButton(
/// style: ButtonStyle(
/// style: ButtonStyle(
/// backgroundColor: MaterialStateProperty.resolveWith<Color>(
/// backgroundColor: MaterialStateProperty.resolveWith<Color>(
/// (Set<MaterialState> states) {
/// (Set<MaterialState> states) {
...
@@ -48,11 +48,11 @@ import 'theme_data.dart';
...
@@ -48,11 +48,11 @@ import 'theme_data.dart';
///```
///```
///
///
/// In this case the background color for all other button states would fallback
/// In this case the background color for all other button states would fallback
/// to the
Contain
edButton’s default values. To unconditionally set the button's
/// to the
Elevat
edButton’s default values. To unconditionally set the button's
/// [backgroundColor] for all states one could write:
/// [backgroundColor] for all states one could write:
///
///
/// ```dart
/// ```dart
///
Contain
edButton(
///
Elevat
edButton(
/// style: ButtonStyle(
/// style: ButtonStyle(
/// backgroundColor: MaterialStateProperty.all<Color>(Colors.green),
/// backgroundColor: MaterialStateProperty.all<Color>(Colors.green),
/// ),
/// ),
...
@@ -66,7 +66,7 @@ import 'theme_data.dart';
...
@@ -66,7 +66,7 @@ import 'theme_data.dart';
/// useful to make relatively sweeping changes based on a few initial
/// useful to make relatively sweeping changes based on a few initial
/// parameters with simple values. The button styleFrom() methods
/// parameters with simple values. The button styleFrom() methods
/// enable such sweeping changes. See for example:
/// enable such sweeping changes. See for example:
/// [TextButton.styleFrom], [
Contain
edButton.styleFrom],
/// [TextButton.styleFrom], [
Elevat
edButton.styleFrom],
/// [OutlinedButton.styleFrom].
/// [OutlinedButton.styleFrom].
///
///
/// For example, to override the default text and icon colors for a
/// For example, to override the default text and icon colors for a
...
@@ -95,7 +95,7 @@ import 'theme_data.dart';
...
@@ -95,7 +95,7 @@ import 'theme_data.dart';
/// See also:
/// See also:
///
///
/// * [TextButtonTheme], the theme for [TextButton]s.
/// * [TextButtonTheme], the theme for [TextButton]s.
/// * [
ContainedButtonTheme], the theme for [Contain
edButton]s.
/// * [
ElevatedButtonTheme], the theme for [Elevat
edButton]s.
/// * [OutlinedButtonTheme], the theme for [OutlinedButton]s.
/// * [OutlinedButtonTheme], the theme for [OutlinedButton]s.
@immutable
@immutable
class
ButtonStyle
with
Diagnosticable
{
class
ButtonStyle
with
Diagnosticable
{
...
...
packages/flutter/lib/src/material/button_style_button.dart
View file @
eac17471
...
@@ -27,7 +27,7 @@ import 'theme_data.dart';
...
@@ -27,7 +27,7 @@ import 'theme_data.dart';
/// See also:
/// See also:
///
///
/// * [TextButton], a simple ButtonStyleButton without a shadow.
/// * [TextButton], a simple ButtonStyleButton without a shadow.
/// * [
Contain
edButton], a filled ButtonStyleButton whose material elevates when pressed.
/// * [
Elevat
edButton], a filled ButtonStyleButton whose material elevates when pressed.
/// * [OutlinedButton], similar to [TextButton], but with an outline.
/// * [OutlinedButton], similar to [TextButton], but with an outline.
abstract
class
ButtonStyleButton
extends
StatefulWidget
{
abstract
class
ButtonStyleButton
extends
StatefulWidget
{
/// Create a [ButtonStyleButton].
/// Create a [ButtonStyleButton].
...
@@ -177,7 +177,7 @@ abstract class ButtonStyleButton extends StatefulWidget {
...
@@ -177,7 +177,7 @@ abstract class ButtonStyleButton extends StatefulWidget {
///
///
/// * [ButtonStyleButton], the [StatefulWidget] subclass for which this class is the [State].
/// * [ButtonStyleButton], the [StatefulWidget] subclass for which this class is the [State].
/// * [TextButton], a simple button without a shadow.
/// * [TextButton], a simple button without a shadow.
/// * [
Contain
edButton], a filled button whose material elevates when pressed.
/// * [
Elevat
edButton], a filled button whose material elevates when pressed.
/// * [OutlinedButton], similar to [TextButton], but with an outline.
/// * [OutlinedButton], similar to [TextButton], but with an outline.
class
_ButtonStyleState
extends
State
<
ButtonStyleButton
>
{
class
_ButtonStyleState
extends
State
<
ButtonStyleButton
>
{
final
Set
<
MaterialState
>
_states
=
<
MaterialState
>{};
final
Set
<
MaterialState
>
_states
=
<
MaterialState
>{};
...
...
packages/flutter/lib/src/material/
contain
ed_button.dart
→
packages/flutter/lib/src/material/
elevat
ed_button.dart
View file @
eac17471
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/material/
contain
ed_button_theme.dart
→
packages/flutter/lib/src/material/
elevat
ed_button_theme.dart
View file @
eac17471
...
@@ -11,47 +11,47 @@ import 'button_style.dart';
...
@@ -11,47 +11,47 @@ import 'button_style.dart';
import
'theme.dart'
;
import
'theme.dart'
;
/// A [ButtonStyle] that overrides the default appearance of
/// A [ButtonStyle] that overrides the default appearance of
/// [
ContainedButton]s when it's used with [Contain
edButtonTheme] or with the
/// [
ElevatedButton]s when it's used with [Elevat
edButtonTheme] or with the
/// overall [Theme]'s [ThemeData.
contain
edButtonTheme].
/// overall [Theme]'s [ThemeData.
Elevat
edButtonTheme].
///
///
/// The [style]'s properties override [
Contain
edButton]'s default style,
/// The [style]'s properties override [
Elevat
edButton]'s default style,
/// i.e. the [ButtonStyle] returned by [
Contain
edButton.defaultStyleOf]. Only
/// i.e. the [ButtonStyle] returned by [
Elevat
edButton.defaultStyleOf]. Only
/// the style's non-null property values or resolved non-null
/// the style's non-null property values or resolved non-null
/// [MaterialStateProperty] values are used.
/// [MaterialStateProperty] values are used.
///
///
/// See also:
/// See also:
///
///
/// * [
Contain
edButtonTheme], the theme which is configured with this class.
/// * [
Elevat
edButtonTheme], the theme which is configured with this class.
/// * [
Contain
edButton.defaultStyleOf], which returns the default [ButtonStyle]
/// * [
Elevat
edButton.defaultStyleOf], which returns the default [ButtonStyle]
/// for text buttons.
/// for text buttons.
/// * [
Contain
edButton.styleOf], which converts simple values into a
/// * [
Elevat
edButton.styleOf], which converts simple values into a
/// [ButtonStyle] that's consistent with [
Contain
edButton]'s defaults.
/// [ButtonStyle] that's consistent with [
Elevat
edButton]'s defaults.
/// * [MaterialStateProperty.resolve], "resolve" a material state property
/// * [MaterialStateProperty.resolve], "resolve" a material state property
/// to a simple value based on a set of [MaterialState]s.
/// to a simple value based on a set of [MaterialState]s.
/// * [ThemeData.
contain
edButtonTheme], which can be used to override the default
/// * [ThemeData.
Elevat
edButtonTheme], which can be used to override the default
/// [ButtonStyle] for [
Contain
edButton]s below the overall [Theme].
/// [ButtonStyle] for [
Elevat
edButton]s below the overall [Theme].
@immutable
@immutable
class
Contain
edButtonThemeData
with
Diagnosticable
{
class
Elevat
edButtonThemeData
with
Diagnosticable
{
/// Creates a
[Contain
edButtonThemeData].
/// Creates a
n [Elevat
edButtonThemeData].
///
///
/// The [style] may be null.
/// The [style] may be null.
const
Contain
edButtonThemeData
({
this
.
style
});
const
Elevat
edButtonThemeData
({
this
.
style
});
/// Overrides for [
Contain
edButton]'s default style.
/// Overrides for [
Elevat
edButton]'s default style.
///
///
/// Non-null properties or non-null resolved [MaterialStateProperty]
/// Non-null properties or non-null resolved [MaterialStateProperty]
/// values override the [ButtonStyle] returned by
/// values override the [ButtonStyle] returned by
/// [
Contain
edButton.defaultStyleOf].
/// [
Elevat
edButton.defaultStyleOf].
///
///
/// If [style] is null, then this theme doesn't override anything.
/// If [style] is null, then this theme doesn't override anything.
final
ButtonStyle
style
;
final
ButtonStyle
style
;
/// Linearly interpolate between two
contain
ed button themes.
/// Linearly interpolate between two
elevat
ed button themes.
static
ContainedButtonThemeData
lerp
(
ContainedButtonThemeData
a
,
Contain
edButtonThemeData
b
,
double
t
)
{
static
ElevatedButtonThemeData
lerp
(
ElevatedButtonThemeData
a
,
Elevat
edButtonThemeData
b
,
double
t
)
{
assert
(
t
!=
null
);
assert
(
t
!=
null
);
if
(
a
==
null
&&
b
==
null
)
if
(
a
==
null
&&
b
==
null
)
return
null
;
return
null
;
return
Contain
edButtonThemeData
(
return
Elevat
edButtonThemeData
(
style:
ButtonStyle
.
lerp
(
a
?.
style
,
b
?.
style
,
t
),
style:
ButtonStyle
.
lerp
(
a
?.
style
,
b
?.
style
,
t
),
);
);
}
}
...
@@ -67,7 +67,7 @@ class ContainedButtonThemeData with Diagnosticable {
...
@@ -67,7 +67,7 @@ class ContainedButtonThemeData with Diagnosticable {
return
true
;
return
true
;
if
(
other
.
runtimeType
!=
runtimeType
)
if
(
other
.
runtimeType
!=
runtimeType
)
return
false
;
return
false
;
return
other
is
Contain
edButtonThemeData
&&
other
.
style
==
style
;
return
other
is
Elevat
edButtonThemeData
&&
other
.
style
==
style
;
}
}
@override
@override
...
@@ -77,51 +77,84 @@ class ContainedButtonThemeData with Diagnosticable {
...
@@ -77,51 +77,84 @@ class ContainedButtonThemeData with Diagnosticable {
}
}
}
}
/// Overrides the default [ButtonStyle] of its [
Contain
edButton] descendants.
/// Overrides the default [ButtonStyle] of its [
Elevat
edButton] descendants.
///
///
/// See also:
/// See also:
///
///
/// * [
Contain
edButtonThemeData], which is used to configure this theme.
/// * [
Elevat
edButtonThemeData], which is used to configure this theme.
/// * [
Contain
edButton.defaultStyleOf], which returns the default [ButtonStyle]
/// * [
Elevat
edButton.defaultStyleOf], which returns the default [ButtonStyle]
/// for
text
buttons.
/// for
elevated
buttons.
/// * [
Contain
edButton.styleOf], which converts simple values into a
/// * [
Elevat
edButton.styleOf], which converts simple values into a
/// [ButtonStyle] that's consistent with [
Contain
edButton]'s defaults.
/// [ButtonStyle] that's consistent with [
Elevat
edButton]'s defaults.
/// * [ThemeData.
contain
edButtonTheme], which can be used to override the default
/// * [ThemeData.
Elevat
edButtonTheme], which can be used to override the default
/// [ButtonStyle] for [
Contain
edButton]s below the overall [Theme].
/// [ButtonStyle] for [
Elevat
edButton]s below the overall [Theme].
class
Contain
edButtonTheme
extends
InheritedTheme
{
class
Elevat
edButtonTheme
extends
InheritedTheme
{
/// Create a [
Contain
edButtonTheme].
/// Create a [
Elevat
edButtonTheme].
///
///
/// The [data] parameter must not be null.
/// The [data] parameter must not be null.
const
Contain
edButtonTheme
({
const
Elevat
edButtonTheme
({
Key
key
,
Key
key
,
@required
this
.
data
,
@required
this
.
data
,
Widget
child
,
Widget
child
,
})
:
assert
(
data
!=
null
),
super
(
key:
key
,
child:
child
);
})
:
assert
(
data
!=
null
),
super
(
key:
key
,
child:
child
);
/// The configuration of this theme.
/// The configuration of this theme.
final
Contain
edButtonThemeData
data
;
final
Elevat
edButtonThemeData
data
;
/// The closest instance of this class that encloses the given context.
/// The closest instance of this class that encloses the given context.
///
///
/// If there is no enclosing [
Contain
edButtonsTheme] widget, then
/// If there is no enclosing [
Elevat
edButtonsTheme] widget, then
/// [ThemeData.
contain
edButtonTheme] is used.
/// [ThemeData.
Elevat
edButtonTheme] is used.
///
///
/// Typical usage is as follows:
/// Typical usage is as follows:
///
///
/// ```dart
/// ```dart
///
ContainedButtonTheme theme = Contain
edButtonTheme.of(context);
///
ElevatedButtonTheme theme = Elevat
edButtonTheme.of(context);
/// ```
/// ```
static
Contain
edButtonThemeData
of
(
BuildContext
context
)
{
static
Elevat
edButtonThemeData
of
(
BuildContext
context
)
{
final
ContainedButtonTheme
buttonTheme
=
context
.
dependOnInheritedWidgetOfExactType
<
Contain
edButtonTheme
>();
final
ElevatedButtonTheme
buttonTheme
=
context
.
dependOnInheritedWidgetOfExactType
<
Elevat
edButtonTheme
>();
return
buttonTheme
?.
data
??
Theme
.
of
(
context
).
contain
edButtonTheme
;
return
buttonTheme
?.
data
??
Theme
.
of
(
context
).
elevat
edButtonTheme
;
}
}
@override
@override
Widget
wrap
(
BuildContext
context
,
Widget
child
)
{
Widget
wrap
(
BuildContext
context
,
Widget
child
)
{
final
ContainedButtonTheme
ancestorTheme
=
context
.
findAncestorWidgetOfExactType
<
Contain
edButtonTheme
>();
final
ElevatedButtonTheme
ancestorTheme
=
context
.
findAncestorWidgetOfExactType
<
Elevat
edButtonTheme
>();
return
identical
(
this
,
ancestorTheme
)
?
child
:
Contain
edButtonTheme
(
data:
data
,
child:
child
);
return
identical
(
this
,
ancestorTheme
)
?
child
:
Elevat
edButtonTheme
(
data:
data
,
child:
child
);
}
}
@override
@override
bool
updateShouldNotify
(
ContainedButtonTheme
oldWidget
)
=>
data
!=
oldWidget
.
data
;
bool
updateShouldNotify
(
ElevatedButtonTheme
oldWidget
)
=>
data
!=
oldWidget
.
data
;
}
/// Please use [ElevatedButtonTheme].
@Deprecated
(
'This class was briefly released with the wrong name. '
'The correct name is ElevatedButtonThemeData. '
'This feature was deprecated after v1.20.0-2.0.pre.'
)
@immutable
class
ContainedButtonThemeData
extends
ElevatedButtonThemeData
{
/// Please use [new ElevatedButtonTheme].
const
ContainedButtonThemeData
({
ButtonStyle
style
})
:
super
(
style:
style
);
/// Please use [ElevatedButtonTheme.lerp()].
static
ContainedButtonThemeData
lerp
(
ContainedButtonThemeData
a
,
ContainedButtonThemeData
b
,
double
t
)
{
return
ElevatedButtonThemeData
.
lerp
(
a
,
b
,
t
)
as
ContainedButtonThemeData
;
}
}
/// Please use [ElevatedButtonThemeData].
@Deprecated
(
'This class was briefly released with the wrong name. '
'The correct name is ElevatedButtonTheme. '
'This feature was deprecated after v1.20.0-2.0.pre.'
)
class
ContainedButtonTheme
extends
ElevatedButtonTheme
{
/// Please use [new ElevatedButtonThemeData].
const
ContainedButtonTheme
({
Key
key
,
@required
ContainedButtonThemeData
data
,
Widget
child
,
})
:
assert
(
data
!=
null
),
super
(
key:
key
,
data:
data
,
child:
child
);
}
}
packages/flutter/lib/src/material/outlined_button.dart
View file @
eac17471
...
@@ -46,7 +46,7 @@ import 'theme_data.dart';
...
@@ -46,7 +46,7 @@ import 'theme_data.dart';
///
///
/// See also:
/// See also:
///
///
/// * [
Contain
edButton], a filled material design button with a shadow.
/// * [
Elevat
edButton], a filled material design button with a shadow.
/// * [TextButton], a material design button without a shadow.
/// * [TextButton], a material design button without a shadow.
/// * <https://material.io/design/components/buttons.html>
/// * <https://material.io/design/components/buttons.html>
class
OutlinedButton
extends
ButtonStyleButton
{
class
OutlinedButton
extends
ButtonStyleButton
{
...
...
packages/flutter/lib/src/material/outlined_button_theme.dart
View file @
eac17471
...
@@ -23,7 +23,7 @@ import 'theme.dart';
...
@@ -23,7 +23,7 @@ import 'theme.dart';
///
///
/// * [OutlinedButtonTheme], the theme which is configured with this class.
/// * [OutlinedButtonTheme], the theme which is configured with this class.
/// * [OutlinedButton.defaultStyleOf], which returns the default [ButtonStyle]
/// * [OutlinedButton.defaultStyleOf], which returns the default [ButtonStyle]
/// for
text
buttons.
/// for
outlined
buttons.
/// * [OutlinedButton.styleOf], which converts simple values into a
/// * [OutlinedButton.styleOf], which converts simple values into a
/// [ButtonStyle] that's consistent with [OutlinedButton]'s defaults.
/// [ButtonStyle] that's consistent with [OutlinedButton]'s defaults.
/// * [MaterialStateProperty.resolve], "resolve" a material state property
/// * [MaterialStateProperty.resolve], "resolve" a material state property
...
@@ -83,7 +83,7 @@ class OutlinedButtonThemeData with Diagnosticable {
...
@@ -83,7 +83,7 @@ class OutlinedButtonThemeData with Diagnosticable {
///
///
/// * [OutlinedButtonThemeData], which is used to configure this theme.
/// * [OutlinedButtonThemeData], which is used to configure this theme.
/// * [OutlinedButton.defaultStyleOf], which returns the default [ButtonStyle]
/// * [OutlinedButton.defaultStyleOf], which returns the default [ButtonStyle]
/// for
text
buttons.
/// for
outlined
buttons.
/// * [OutlinedButton.styleOf], which converts simple values into a
/// * [OutlinedButton.styleOf], which converts simple values into a
/// [ButtonStyle] that's consistent with [OutlinedButton]'s defaults.
/// [ButtonStyle] that's consistent with [OutlinedButton]'s defaults.
/// * [ThemeData.outlinedButtonTheme], which can be used to override the default
/// * [ThemeData.outlinedButtonTheme], which can be used to override the default
...
...
packages/flutter/lib/src/material/text_button.dart
View file @
eac17471
...
@@ -54,7 +54,7 @@ import 'theme_data.dart';
...
@@ -54,7 +54,7 @@ import 'theme_data.dart';
/// See also:
/// See also:
///
///
/// * [OutlinedButton], a [TextButton] with a border outline.
/// * [OutlinedButton], a [TextButton] with a border outline.
/// * [
Contain
edButton], a filled button whose material elevates when pressed.
/// * [
Elevat
edButton], a filled button whose material elevates when pressed.
/// * <https://material.io/design/components/buttons.html>
/// * <https://material.io/design/components/buttons.html>
class
TextButton
extends
ButtonStyleButton
{
class
TextButton
extends
ButtonStyleButton
{
/// Create a TextButton.
/// Create a TextButton.
...
...
packages/flutter/lib/src/material/theme_data.dart
View file @
eac17471
...
@@ -22,9 +22,9 @@ import 'card_theme.dart';
...
@@ -22,9 +22,9 @@ import 'card_theme.dart';
import
'chip_theme.dart'
;
import
'chip_theme.dart'
;
import
'color_scheme.dart'
;
import
'color_scheme.dart'
;
import
'colors.dart'
;
import
'colors.dart'
;
import
'contained_button_theme.dart'
;
import
'dialog_theme.dart'
;
import
'dialog_theme.dart'
;
import
'divider_theme.dart'
;
import
'divider_theme.dart'
;
import
'elevated_button_theme.dart'
;
import
'floating_action_button_theme.dart'
;
import
'floating_action_button_theme.dart'
;
import
'ink_splash.dart'
;
import
'ink_splash.dart'
;
import
'ink_well.dart'
show
InteractiveInkFeatureFactory
;
import
'ink_well.dart'
show
InteractiveInkFeatureFactory
;
...
@@ -276,7 +276,7 @@ class ThemeData with Diagnosticable {
...
@@ -276,7 +276,7 @@ class ThemeData with Diagnosticable {
BottomNavigationBarThemeData
bottomNavigationBarTheme
,
BottomNavigationBarThemeData
bottomNavigationBarTheme
,
TimePickerThemeData
timePickerTheme
,
TimePickerThemeData
timePickerTheme
,
TextButtonThemeData
textButtonTheme
,
TextButtonThemeData
textButtonTheme
,
ContainedButtonThemeData
contain
edButtonTheme
,
ElevatedButtonThemeData
elevat
edButtonTheme
,
OutlinedButtonThemeData
outlinedButtonTheme
,
OutlinedButtonThemeData
outlinedButtonTheme
,
bool
fixTextFieldOutlineLabel
,
bool
fixTextFieldOutlineLabel
,
})
{
})
{
...
@@ -392,7 +392,7 @@ class ThemeData with Diagnosticable {
...
@@ -392,7 +392,7 @@ class ThemeData with Diagnosticable {
bottomNavigationBarTheme
??=
const
BottomNavigationBarThemeData
();
bottomNavigationBarTheme
??=
const
BottomNavigationBarThemeData
();
timePickerTheme
??=
const
TimePickerThemeData
();
timePickerTheme
??=
const
TimePickerThemeData
();
textButtonTheme
??=
const
TextButtonThemeData
();
textButtonTheme
??=
const
TextButtonThemeData
();
containedButtonTheme
??=
const
Contain
edButtonThemeData
();
elevatedButtonTheme
??=
const
Elevat
edButtonThemeData
();
outlinedButtonTheme
??=
const
OutlinedButtonThemeData
();
outlinedButtonTheme
??=
const
OutlinedButtonThemeData
();
fixTextFieldOutlineLabel
??=
false
;
fixTextFieldOutlineLabel
??=
false
;
...
@@ -464,7 +464,7 @@ class ThemeData with Diagnosticable {
...
@@ -464,7 +464,7 @@ class ThemeData with Diagnosticable {
bottomNavigationBarTheme:
bottomNavigationBarTheme
,
bottomNavigationBarTheme:
bottomNavigationBarTheme
,
timePickerTheme:
timePickerTheme
,
timePickerTheme:
timePickerTheme
,
textButtonTheme:
textButtonTheme
,
textButtonTheme:
textButtonTheme
,
containedButtonTheme:
contain
edButtonTheme
,
elevatedButtonTheme:
elevat
edButtonTheme
,
outlinedButtonTheme:
outlinedButtonTheme
,
outlinedButtonTheme:
outlinedButtonTheme
,
fixTextFieldOutlineLabel:
fixTextFieldOutlineLabel
,
fixTextFieldOutlineLabel:
fixTextFieldOutlineLabel
,
);
);
...
@@ -548,7 +548,7 @@ class ThemeData with Diagnosticable {
...
@@ -548,7 +548,7 @@ class ThemeData with Diagnosticable {
@required
this
.
bottomNavigationBarTheme
,
@required
this
.
bottomNavigationBarTheme
,
@required
this
.
timePickerTheme
,
@required
this
.
timePickerTheme
,
@required
this
.
textButtonTheme
,
@required
this
.
textButtonTheme
,
@required
this
.
contain
edButtonTheme
,
@required
this
.
elevat
edButtonTheme
,
@required
this
.
outlinedButtonTheme
,
@required
this
.
outlinedButtonTheme
,
@required
this
.
fixTextFieldOutlineLabel
,
@required
this
.
fixTextFieldOutlineLabel
,
})
:
assert
(
visualDensity
!=
null
),
})
:
assert
(
visualDensity
!=
null
),
...
@@ -615,7 +615,7 @@ class ThemeData with Diagnosticable {
...
@@ -615,7 +615,7 @@ class ThemeData with Diagnosticable {
assert
(
bottomNavigationBarTheme
!=
null
),
assert
(
bottomNavigationBarTheme
!=
null
),
assert
(
timePickerTheme
!=
null
),
assert
(
timePickerTheme
!=
null
),
assert
(
textButtonTheme
!=
null
),
assert
(
textButtonTheme
!=
null
),
assert
(
contain
edButtonTheme
!=
null
),
assert
(
elevat
edButtonTheme
!=
null
),
assert
(
outlinedButtonTheme
!=
null
),
assert
(
outlinedButtonTheme
!=
null
),
assert
(
fixTextFieldOutlineLabel
!=
null
);
assert
(
fixTextFieldOutlineLabel
!=
null
);
...
@@ -1086,8 +1086,8 @@ class ThemeData with Diagnosticable {
...
@@ -1086,8 +1086,8 @@ class ThemeData with Diagnosticable {
final
TextButtonThemeData
textButtonTheme
;
final
TextButtonThemeData
textButtonTheme
;
/// A theme for customizing the appearance and internal layout of
/// A theme for customizing the appearance and internal layout of
/// [
Contain
edButton]s
/// [
Elevat
edButton]s
final
ContainedButtonThemeData
contain
edButtonTheme
;
final
ElevatedButtonThemeData
elevat
edButtonTheme
;
/// A theme for customizing the appearance and internal layout of
/// A theme for customizing the appearance and internal layout of
/// [OutlinedButton]s.
/// [OutlinedButton]s.
...
@@ -1177,7 +1177,7 @@ class ThemeData with Diagnosticable {
...
@@ -1177,7 +1177,7 @@ class ThemeData with Diagnosticable {
BottomNavigationBarThemeData
bottomNavigationBarTheme
,
BottomNavigationBarThemeData
bottomNavigationBarTheme
,
TimePickerThemeData
timePickerTheme
,
TimePickerThemeData
timePickerTheme
,
TextButtonThemeData
textButtonTheme
,
TextButtonThemeData
textButtonTheme
,
ContainedButtonThemeData
contain
edButtonTheme
,
ElevatedButtonThemeData
elevat
edButtonTheme
,
OutlinedButtonThemeData
outlinedButtonTheme
,
OutlinedButtonThemeData
outlinedButtonTheme
,
bool
fixTextFieldOutlineLabel
,
bool
fixTextFieldOutlineLabel
,
})
{
})
{
...
@@ -1250,7 +1250,7 @@ class ThemeData with Diagnosticable {
...
@@ -1250,7 +1250,7 @@ class ThemeData with Diagnosticable {
bottomNavigationBarTheme:
bottomNavigationBarTheme
??
this
.
bottomNavigationBarTheme
,
bottomNavigationBarTheme:
bottomNavigationBarTheme
??
this
.
bottomNavigationBarTheme
,
timePickerTheme:
timePickerTheme
??
this
.
timePickerTheme
,
timePickerTheme:
timePickerTheme
??
this
.
timePickerTheme
,
textButtonTheme:
textButtonTheme
??
this
.
textButtonTheme
,
textButtonTheme:
textButtonTheme
??
this
.
textButtonTheme
,
containedButtonTheme:
containedButtonTheme
??
this
.
contain
edButtonTheme
,
elevatedButtonTheme:
elevatedButtonTheme
??
this
.
elevat
edButtonTheme
,
outlinedButtonTheme:
outlinedButtonTheme
??
this
.
outlinedButtonTheme
,
outlinedButtonTheme:
outlinedButtonTheme
??
this
.
outlinedButtonTheme
,
fixTextFieldOutlineLabel:
fixTextFieldOutlineLabel
??
this
.
fixTextFieldOutlineLabel
,
fixTextFieldOutlineLabel:
fixTextFieldOutlineLabel
??
this
.
fixTextFieldOutlineLabel
,
);
);
...
@@ -1401,7 +1401,7 @@ class ThemeData with Diagnosticable {
...
@@ -1401,7 +1401,7 @@ class ThemeData with Diagnosticable {
bottomNavigationBarTheme:
BottomNavigationBarThemeData
.
lerp
(
a
.
bottomNavigationBarTheme
,
b
.
bottomNavigationBarTheme
,
t
),
bottomNavigationBarTheme:
BottomNavigationBarThemeData
.
lerp
(
a
.
bottomNavigationBarTheme
,
b
.
bottomNavigationBarTheme
,
t
),
timePickerTheme:
TimePickerThemeData
.
lerp
(
a
.
timePickerTheme
,
b
.
timePickerTheme
,
t
),
timePickerTheme:
TimePickerThemeData
.
lerp
(
a
.
timePickerTheme
,
b
.
timePickerTheme
,
t
),
textButtonTheme:
TextButtonThemeData
.
lerp
(
a
.
textButtonTheme
,
b
.
textButtonTheme
,
t
),
textButtonTheme:
TextButtonThemeData
.
lerp
(
a
.
textButtonTheme
,
b
.
textButtonTheme
,
t
),
containedButtonTheme:
ContainedButtonThemeData
.
lerp
(
a
.
containedButtonTheme
,
b
.
contain
edButtonTheme
,
t
),
elevatedButtonTheme:
ElevatedButtonThemeData
.
lerp
(
a
.
elevatedButtonTheme
,
b
.
elevat
edButtonTheme
,
t
),
outlinedButtonTheme:
OutlinedButtonThemeData
.
lerp
(
a
.
outlinedButtonTheme
,
b
.
outlinedButtonTheme
,
t
),
outlinedButtonTheme:
OutlinedButtonThemeData
.
lerp
(
a
.
outlinedButtonTheme
,
b
.
outlinedButtonTheme
,
t
),
fixTextFieldOutlineLabel:
t
<
0.5
?
a
.
fixTextFieldOutlineLabel
:
b
.
fixTextFieldOutlineLabel
,
fixTextFieldOutlineLabel:
t
<
0.5
?
a
.
fixTextFieldOutlineLabel
:
b
.
fixTextFieldOutlineLabel
,
);
);
...
@@ -1480,7 +1480,7 @@ class ThemeData with Diagnosticable {
...
@@ -1480,7 +1480,7 @@ class ThemeData with Diagnosticable {
&&
other
.
bottomNavigationBarTheme
==
bottomNavigationBarTheme
&&
other
.
bottomNavigationBarTheme
==
bottomNavigationBarTheme
&&
other
.
timePickerTheme
==
timePickerTheme
&&
other
.
timePickerTheme
==
timePickerTheme
&&
other
.
textButtonTheme
==
textButtonTheme
&&
other
.
textButtonTheme
==
textButtonTheme
&&
other
.
containedButtonTheme
==
contain
edButtonTheme
&&
other
.
elevatedButtonTheme
==
elevat
edButtonTheme
&&
other
.
outlinedButtonTheme
==
outlinedButtonTheme
&&
other
.
outlinedButtonTheme
==
outlinedButtonTheme
&&
other
.
fixTextFieldOutlineLabel
==
fixTextFieldOutlineLabel
;
&&
other
.
fixTextFieldOutlineLabel
==
fixTextFieldOutlineLabel
;
}
}
...
@@ -1558,7 +1558,7 @@ class ThemeData with Diagnosticable {
...
@@ -1558,7 +1558,7 @@ class ThemeData with Diagnosticable {
bottomNavigationBarTheme
,
bottomNavigationBarTheme
,
timePickerTheme
,
timePickerTheme
,
textButtonTheme
,
textButtonTheme
,
contain
edButtonTheme
,
elevat
edButtonTheme
,
outlinedButtonTheme
,
outlinedButtonTheme
,
fixTextFieldOutlineLabel
,
fixTextFieldOutlineLabel
,
];
];
...
@@ -1633,7 +1633,7 @@ class ThemeData with Diagnosticable {
...
@@ -1633,7 +1633,7 @@ 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
<
BottomNavigationBarThemeData
>(
'bottomNavigationBarTheme'
,
bottomNavigationBarTheme
,
defaultValue:
defaultData
.
bottomNavigationBarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
BottomNavigationBarThemeData
>(
'bottomNavigationBarTheme'
,
bottomNavigationBarTheme
,
defaultValue:
defaultData
.
bottomNavigationBarTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextButtonThemeData
>(
'textButtonTheme'
,
textButtonTheme
,
defaultValue:
defaultData
.
textButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
TextButtonThemeData
>(
'textButtonTheme'
,
textButtonTheme
,
defaultValue:
defaultData
.
textButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ContainedButtonThemeData
>(
'containedButtonTheme'
,
containedButtonTheme
,
defaultValue:
defaultData
.
contain
edButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
ElevatedButtonThemeData
>(
'elevatedButtonTheme'
,
elevatedButtonTheme
,
defaultValue:
defaultData
.
elevat
edButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
OutlinedButtonThemeData
>(
'outlinedButtonTheme'
,
outlinedButtonTheme
,
defaultValue:
defaultData
.
outlinedButtonTheme
,
level:
DiagnosticLevel
.
debug
));
properties
.
add
(
DiagnosticsProperty
<
OutlinedButtonThemeData
>(
'outlinedButtonTheme'
,
outlinedButtonTheme
,
defaultValue:
defaultData
.
outlinedButtonTheme
,
level:
DiagnosticLevel
.
debug
));
}
}
}
}
...
...
packages/flutter/test/material/
contain
ed_button_test.dart
→
packages/flutter/test/material/
elevat
ed_button_test.dart
View file @
eac17471
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/
contain
ed_button_theme_test.dart
→
packages/flutter/test/material/
elevat
ed_button_theme_test.dart
View file @
eac17471
...
@@ -9,14 +9,14 @@ import 'package:flutter/rendering.dart';
...
@@ -9,14 +9,14 @@ import 'package:flutter/rendering.dart';
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
void
main
(
)
{
testWidgets
(
'Passing no
Contain
edButtonTheme returns defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Passing no
Elevat
edButtonTheme returns defaults'
,
(
WidgetTester
tester
)
async
{
const
ColorScheme
colorScheme
=
ColorScheme
.
light
();
const
ColorScheme
colorScheme
=
ColorScheme
.
light
();
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
MaterialApp
(
MaterialApp
(
theme:
ThemeData
.
from
(
colorScheme:
colorScheme
),
theme:
ThemeData
.
from
(
colorScheme:
colorScheme
),
home:
Scaffold
(
home:
Scaffold
(
body:
Center
(
body:
Center
(
child:
Contain
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
},
onPressed:
()
{
},
child:
const
Text
(
'button'
),
child:
const
Text
(
'button'
),
),
),
...
@@ -26,7 +26,7 @@ void main() {
...
@@ -26,7 +26,7 @@ void main() {
);
);
final
Finder
buttonMaterial
=
find
.
descendant
(
final
Finder
buttonMaterial
=
find
.
descendant
(
of:
find
.
byType
(
Contain
edButton
),
of:
find
.
byType
(
Elevat
edButton
),
matching:
find
.
byType
(
Material
),
matching:
find
.
byType
(
Material
),
);
);
...
@@ -43,7 +43,7 @@ void main() {
...
@@ -43,7 +43,7 @@ void main() {
expect
(
material
.
textStyle
.
fontWeight
,
FontWeight
.
w500
);
expect
(
material
.
textStyle
.
fontWeight
,
FontWeight
.
w500
);
});
});
group
(
'[Theme, TextTheme,
Contain
edButton style overrides]'
,
()
{
group
(
'[Theme, TextTheme,
Elevat
edButton style overrides]'
,
()
{
const
Color
primaryColor
=
Color
(
0xff000001
);
const
Color
primaryColor
=
Color
(
0xff000001
);
const
Color
onSurfaceColor
=
Color
(
0xff000002
);
const
Color
onSurfaceColor
=
Color
(
0xff000002
);
const
Color
shadowColor
=
Color
(
0xff000004
);
const
Color
shadowColor
=
Color
(
0xff000004
);
...
@@ -60,7 +60,7 @@ void main() {
...
@@ -60,7 +60,7 @@ void main() {
const
Duration
animationDuration
=
Duration
(
milliseconds:
25
);
const
Duration
animationDuration
=
Duration
(
milliseconds:
25
);
const
bool
enableFeedback
=
false
;
const
bool
enableFeedback
=
false
;
final
ButtonStyle
style
=
Contain
edButton
.
styleFrom
(
final
ButtonStyle
style
=
Elevat
edButton
.
styleFrom
(
primary:
primaryColor
,
primary:
primaryColor
,
onPrimary:
onPrimaryColor
,
onPrimary:
onPrimaryColor
,
onSurface:
onSurfaceColor
,
onSurface:
onSurfaceColor
,
...
@@ -81,7 +81,7 @@ void main() {
...
@@ -81,7 +81,7 @@ void main() {
Widget
buildFrame
({
ButtonStyle
buttonStyle
,
ButtonStyle
themeStyle
,
ButtonStyle
overallStyle
})
{
Widget
buildFrame
({
ButtonStyle
buttonStyle
,
ButtonStyle
themeStyle
,
ButtonStyle
overallStyle
})
{
final
Widget
child
=
Builder
(
final
Widget
child
=
Builder
(
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
return
Contain
edButton
(
return
Elevat
edButton
(
style:
buttonStyle
,
style:
buttonStyle
,
onPressed:
()
{
},
onPressed:
()
{
},
child:
const
Text
(
'button'
),
child:
const
Text
(
'button'
),
...
@@ -90,14 +90,14 @@ void main() {
...
@@ -90,14 +90,14 @@ void main() {
);
);
return
MaterialApp
(
return
MaterialApp
(
theme:
ThemeData
.
from
(
colorScheme:
const
ColorScheme
.
light
()).
copyWith
(
theme:
ThemeData
.
from
(
colorScheme:
const
ColorScheme
.
light
()).
copyWith
(
containedButtonTheme:
Contain
edButtonThemeData
(
style:
overallStyle
),
elevatedButtonTheme:
Elevat
edButtonThemeData
(
style:
overallStyle
),
),
),
home:
Scaffold
(
home:
Scaffold
(
body:
Center
(
body:
Center
(
// If the
Contain
edButtonTheme widget is present, it's used
// If the
Elevat
edButtonTheme widget is present, it's used
// instead of the Theme's ThemeData.
contain
edButtonTheme.
// instead of the Theme's ThemeData.
Elevat
edButtonTheme.
child:
themeStyle
==
null
?
child
:
Contain
edButtonTheme
(
child:
themeStyle
==
null
?
child
:
Elevat
edButtonTheme
(
data:
Contain
edButtonThemeData
(
style:
themeStyle
),
data:
Elevat
edButtonThemeData
(
style:
themeStyle
),
child:
child
,
child:
child
,
),
),
),
),
...
@@ -106,12 +106,12 @@ void main() {
...
@@ -106,12 +106,12 @@ void main() {
}
}
final
Finder
findMaterial
=
find
.
descendant
(
final
Finder
findMaterial
=
find
.
descendant
(
of:
find
.
byType
(
Contain
edButton
),
of:
find
.
byType
(
Elevat
edButton
),
matching:
find
.
byType
(
Material
),
matching:
find
.
byType
(
Material
),
);
);
final
Finder
findInkWell
=
find
.
descendant
(
final
Finder
findInkWell
=
find
.
descendant
(
of:
find
.
byType
(
Contain
edButton
),
of:
find
.
byType
(
Elevat
edButton
),
matching:
find
.
byType
(
InkWell
),
matching:
find
.
byType
(
InkWell
),
);
);
...
@@ -138,7 +138,7 @@ void main() {
...
@@ -138,7 +138,7 @@ void main() {
expect
(
material
.
borderRadius
,
null
);
expect
(
material
.
borderRadius
,
null
);
expect
(
material
.
shape
,
shape
);
expect
(
material
.
shape
,
shape
);
expect
(
material
.
animationDuration
,
animationDuration
);
expect
(
material
.
animationDuration
,
animationDuration
);
expect
(
tester
.
getSize
(
find
.
byType
(
Contain
edButton
)),
const
Size
(
200
,
200
));
expect
(
tester
.
getSize
(
find
.
byType
(
Elevat
edButton
)),
const
Size
(
200
,
200
));
}
}
testWidgets
(
'Button style overrides defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Button style overrides defaults'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/material/theme_data_test.dart
View file @
eac17471
...
@@ -285,7 +285,7 @@ void main() {
...
@@ -285,7 +285,7 @@ void main() {
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
fixed
),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
fixed
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
black
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
black
),
textButtonTheme:
TextButtonThemeData
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
red
)),
textButtonTheme:
TextButtonThemeData
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
red
)),
containedButtonTheme:
ContainedButtonThemeData
(
style:
Contain
edButton
.
styleFrom
(
primary:
Colors
.
green
)),
elevatedButtonTheme:
ElevatedButtonThemeData
(
style:
Elevat
edButton
.
styleFrom
(
primary:
Colors
.
green
)),
outlinedButtonTheme:
OutlinedButtonThemeData
(
style:
OutlinedButton
.
styleFrom
(
primary:
Colors
.
blue
)),
outlinedButtonTheme:
OutlinedButtonThemeData
(
style:
OutlinedButton
.
styleFrom
(
primary:
Colors
.
blue
)),
fixTextFieldOutlineLabel:
false
,
fixTextFieldOutlineLabel:
false
,
);
);
...
@@ -371,7 +371,7 @@ void main() {
...
@@ -371,7 +371,7 @@ void main() {
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
shifting
),
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
type:
BottomNavigationBarType
.
shifting
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
white
),
timePickerTheme:
const
TimePickerThemeData
(
backgroundColor:
Colors
.
white
),
textButtonTheme:
const
TextButtonThemeData
(),
textButtonTheme:
const
TextButtonThemeData
(),
containedButtonTheme:
const
Contain
edButtonThemeData
(),
elevatedButtonTheme:
const
Elevat
edButtonThemeData
(),
outlinedButtonTheme:
const
OutlinedButtonThemeData
(),
outlinedButtonTheme:
const
OutlinedButtonThemeData
(),
fixTextFieldOutlineLabel:
true
,
fixTextFieldOutlineLabel:
true
,
);
);
...
@@ -443,7 +443,7 @@ void main() {
...
@@ -443,7 +443,7 @@ void main() {
bottomNavigationBarTheme:
otherTheme
.
bottomNavigationBarTheme
,
bottomNavigationBarTheme:
otherTheme
.
bottomNavigationBarTheme
,
timePickerTheme:
otherTheme
.
timePickerTheme
,
timePickerTheme:
otherTheme
.
timePickerTheme
,
textButtonTheme:
otherTheme
.
textButtonTheme
,
textButtonTheme:
otherTheme
.
textButtonTheme
,
containedButtonTheme:
otherTheme
.
contain
edButtonTheme
,
elevatedButtonTheme:
otherTheme
.
elevat
edButtonTheme
,
outlinedButtonTheme:
otherTheme
.
outlinedButtonTheme
,
outlinedButtonTheme:
otherTheme
.
outlinedButtonTheme
,
fixTextFieldOutlineLabel:
otherTheme
.
fixTextFieldOutlineLabel
,
fixTextFieldOutlineLabel:
otherTheme
.
fixTextFieldOutlineLabel
,
);
);
...
@@ -514,7 +514,7 @@ void main() {
...
@@ -514,7 +514,7 @@ void main() {
expect
(
themeDataCopy
.
bottomNavigationBarTheme
,
equals
(
otherTheme
.
bottomNavigationBarTheme
));
expect
(
themeDataCopy
.
bottomNavigationBarTheme
,
equals
(
otherTheme
.
bottomNavigationBarTheme
));
expect
(
themeDataCopy
.
timePickerTheme
,
equals
(
otherTheme
.
timePickerTheme
));
expect
(
themeDataCopy
.
timePickerTheme
,
equals
(
otherTheme
.
timePickerTheme
));
expect
(
themeDataCopy
.
textButtonTheme
,
equals
(
otherTheme
.
textButtonTheme
));
expect
(
themeDataCopy
.
textButtonTheme
,
equals
(
otherTheme
.
textButtonTheme
));
expect
(
themeDataCopy
.
containedButtonTheme
,
equals
(
otherTheme
.
contain
edButtonTheme
));
expect
(
themeDataCopy
.
elevatedButtonTheme
,
equals
(
otherTheme
.
elevat
edButtonTheme
));
expect
(
themeDataCopy
.
outlinedButtonTheme
,
equals
(
otherTheme
.
outlinedButtonTheme
));
expect
(
themeDataCopy
.
outlinedButtonTheme
,
equals
(
otherTheme
.
outlinedButtonTheme
));
expect
(
themeDataCopy
.
fixTextFieldOutlineLabel
,
equals
(
otherTheme
.
fixTextFieldOutlineLabel
));
expect
(
themeDataCopy
.
fixTextFieldOutlineLabel
,
equals
(
otherTheme
.
fixTextFieldOutlineLabel
));
});
});
...
...
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