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
7773d0b0
Unverified
Commit
7773d0b0
authored
Jun 14, 2021
by
Kate Lovett
Committed by
GitHub
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated hasFloatingPlaceholder (#83923)
parent
bb9bac9f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
77 deletions
+75
-77
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+61
-0
input_border.dart
packages/flutter/lib/src/material/input_border.dart
+3
-2
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+3
-71
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+2
-4
material.dart
packages/flutter/test_fixes/material.dart
+3
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+3
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
7773d0b0
...
@@ -852,6 +852,67 @@ transforms:
...
@@ -852,6 +852,67 @@ transforms:
kind
:
'
fragment'
kind
:
'
fragment'
value
:
'
arguments[hasFloatingPlaceholder]'
value
:
'
arguments[hasFloatingPlaceholder]'
# Changes made in https://github.com/flutter/flutter/pull/46115
-
title
:
"
Migrate
to
'floatingLabelBehavior'"
date
:
2020-01-15
element
:
uris
:
[
'
material.dart'
]
method
:
'
copyWith'
inClass
:
'
InputDecorationTheme'
oneOf
:
-
if
:
"
hasFloatingPlaceholder
==
'true'"
changes
:
-
kind
:
'
addParameter'
index
:
14
name
:
'
floatingLabelBehavior'
style
:
optional_named
argumentValue
:
expression
:
'
{%
FloatingLabelBehavior
%}.auto'
requiredIf
:
"
hasFloatingPlaceholder
==
'true'"
variables
:
FloatingLabelBehavior
:
kind
:
'
import'
uris
:
[
'
material.dart'
]
name
:
'
FloatingLabelBehavior'
-
kind
:
'
removeParameter'
name
:
'
hasFloatingPlaceholder'
-
if
:
"
hasFloatingPlaceholder
==
'false'"
changes
:
-
kind
:
'
addParameter'
index
:
14
name
:
'
floatingLabelBehavior'
style
:
optional_named
argumentValue
:
expression
:
'
{%
FloatingLabelBehavior
%}.never'
requiredIf
:
"
hasFloatingPlaceholder
==
'false'"
variables
:
FloatingLabelBehavior
:
kind
:
'
import'
uris
:
[
'
material.dart'
]
name
:
'
FloatingLabelBehavior'
-
kind
:
'
removeParameter'
name
:
'
hasFloatingPlaceholder'
-
if
:
"
hasFloatingPlaceholder
!=
'true'
&&
hasFloatingPlaceholder
!=
'false'"
changes
:
-
kind
:
'
addParameter'
index
:
14
name
:
'
floatingLabelBehavior'
style
:
optional_named
argumentValue
:
expression
:
'
{%
hasFloatingPlaceholder
%}
?
{%
FloatingLabelBehavior
%}.auto
:
{%
FloatingLabelBehavior
%}.never'
requiredIf
:
"
hasFloatingPlaceholder
!=
'true'
&&
hasFloatingPlaceholder
!=
'false'"
variables
:
FloatingLabelBehavior
:
kind
:
'
import'
uris
:
[
'
material.dart'
]
name
:
'
FloatingLabelBehavior'
-
kind
:
'
removeParameter'
name
:
'
hasFloatingPlaceholder'
variables
:
hasFloatingPlaceholder
:
kind
:
'
fragment'
value
:
'
arguments[hasFloatingPlaceholder]'
# Changes made in https://github.com/flutter/flutter/pull/46115
# Changes made in https://github.com/flutter/flutter/pull/46115
-
title
:
"
Migrate
to
'floatingLabelBehavior'"
-
title
:
"
Migrate
to
'floatingLabelBehavior'"
date
:
2020-01-15
date
:
2020-01-15
...
...
packages/flutter/lib/src/material/input_border.dart
View file @
7773d0b0
...
@@ -279,8 +279,9 @@ class OutlineInputBorder extends InputBorder {
...
@@ -279,8 +279,9 @@ class OutlineInputBorder extends InputBorder {
///
///
/// See also:
/// See also:
///
///
/// * [InputDecoration.hasFloatingPlaceholder], which should be set to false
/// * [InputDecoration.floatingLabelBehavior], which should be set to
/// when the [borderSide] is [BorderSide.none]. If let as true, the label
/// [FloatingLabelBehavior.never] when the [borderSide] is
/// [BorderSide.none]. If let as [FloatingLabelBehavior.auto], the label
/// will extend beyond the container as if the border were still being
/// will extend beyond the container as if the border were still being
/// drawn.
/// drawn.
const
OutlineInputBorder
({
const
OutlineInputBorder
({
...
...
packages/flutter/lib/src/material/input_decorator.dart
View file @
7773d0b0
...
@@ -1949,7 +1949,6 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
...
@@ -1949,7 +1949,6 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
final
bool
labelIsInitiallyFloating
=
widget
.
decoration
.
floatingLabelBehavior
==
FloatingLabelBehavior
.
always
final
bool
labelIsInitiallyFloating
=
widget
.
decoration
.
floatingLabelBehavior
==
FloatingLabelBehavior
.
always
||
(
widget
.
decoration
.
floatingLabelBehavior
!=
FloatingLabelBehavior
.
never
&&
||
(
widget
.
decoration
.
floatingLabelBehavior
!=
FloatingLabelBehavior
.
never
&&
widget
.
decoration
.
hasFloatingPlaceholder
&&
widget
.
_labelShouldWithdraw
);
widget
.
_labelShouldWithdraw
);
_floatingLabelController
=
AnimationController
(
_floatingLabelController
=
AnimationController
(
...
@@ -1997,7 +1996,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
...
@@ -1997,7 +1996,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
bool
get
isHovering
=>
widget
.
isHovering
&&
decoration
!.
enabled
;
bool
get
isHovering
=>
widget
.
isHovering
&&
decoration
!.
enabled
;
bool
get
isEmpty
=>
widget
.
isEmpty
;
bool
get
isEmpty
=>
widget
.
isEmpty
;
bool
get
_floatingLabelEnabled
{
bool
get
_floatingLabelEnabled
{
return
decoration
!.
hasFloatingPlaceholder
&&
decoration
!.
floatingLabelBehavior
!=
FloatingLabelBehavior
.
never
;
return
decoration
!.
floatingLabelBehavior
!=
FloatingLabelBehavior
.
never
;
}
}
@override
@override
...
@@ -2006,8 +2005,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
...
@@ -2006,8 +2005,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
if
(
widget
.
decoration
!=
old
.
decoration
)
if
(
widget
.
decoration
!=
old
.
decoration
)
_effectiveDecoration
=
null
;
_effectiveDecoration
=
null
;
final
bool
floatBehaviorChanged
=
widget
.
decoration
.
floatingLabelBehavior
!=
old
.
decoration
.
floatingLabelBehavior
final
bool
floatBehaviorChanged
=
widget
.
decoration
.
floatingLabelBehavior
!=
old
.
decoration
.
floatingLabelBehavior
;
||
widget
.
decoration
.
hasFloatingPlaceholder
!=
old
.
decoration
.
hasFloatingPlaceholder
;
if
(
widget
.
_labelShouldWithdraw
!=
old
.
_labelShouldWithdraw
||
floatBehaviorChanged
)
{
if
(
widget
.
_labelShouldWithdraw
!=
old
.
_labelShouldWithdraw
||
floatBehaviorChanged
)
{
if
(
_floatingLabelEnabled
if
(
_floatingLabelEnabled
...
@@ -2537,11 +2535,6 @@ class InputDecoration {
...
@@ -2537,11 +2535,6 @@ class InputDecoration {
this
.
errorText
,
this
.
errorText
,
this
.
errorStyle
,
this
.
errorStyle
,
this
.
errorMaxLines
,
this
.
errorMaxLines
,
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
this
.
hasFloatingPlaceholder
=
true
,
this
.
floatingLabelBehavior
,
this
.
floatingLabelBehavior
,
this
.
isCollapsed
=
false
,
this
.
isCollapsed
=
false
,
this
.
isDense
,
this
.
isDense
,
...
@@ -2584,11 +2577,6 @@ class InputDecoration {
...
@@ -2584,11 +2577,6 @@ class InputDecoration {
/// Sets the [isCollapsed] property to true.
/// Sets the [isCollapsed] property to true.
const
InputDecoration
.
collapsed
({
const
InputDecoration
.
collapsed
({
required
this
.
hintText
,
required
this
.
hintText
,
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
this
.
hasFloatingPlaceholder
=
true
,
this
.
floatingLabelBehavior
,
this
.
floatingLabelBehavior
,
this
.
hintStyle
,
this
.
hintStyle
,
this
.
hintTextDirection
,
this
.
hintTextDirection
,
...
@@ -2599,10 +2587,6 @@ class InputDecoration {
...
@@ -2599,10 +2587,6 @@ class InputDecoration {
this
.
border
=
InputBorder
.
none
,
this
.
border
=
InputBorder
.
none
,
this
.
enabled
=
true
,
this
.
enabled
=
true
,
})
:
assert
(
enabled
!=
null
),
})
:
assert
(
enabled
!=
null
),
assert
(
!(!
hasFloatingPlaceholder
&&
identical
(
floatingLabelBehavior
,
FloatingLabelBehavior
.
always
)),
'hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always'
,
),
icon
=
null
,
icon
=
null
,
labelText
=
null
,
labelText
=
null
,
labelStyle
=
null
,
labelStyle
=
null
,
...
@@ -2760,21 +2744,6 @@ class InputDecoration {
...
@@ -2760,21 +2744,6 @@ class InputDecoration {
/// * [helperMaxLines], the equivalent but for the [helperText].
/// * [helperMaxLines], the equivalent but for the [helperText].
final
int
?
errorMaxLines
;
final
int
?
errorMaxLines
;
/// Whether the label floats on focus.
///
/// If this is false, the placeholder disappears when the input has focus or
/// text has been entered.
/// If this is true, the placeholder will rise to the top of the input when
/// the input has focus or text has been entered.
///
/// Defaults to true.
///
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
final
bool
hasFloatingPlaceholder
;
/// {@template flutter.material.inputDecoration.floatingLabelBehavior}
/// {@template flutter.material.inputDecoration.floatingLabelBehavior}
/// Defines how the floating label should be displayed.
/// Defines how the floating label should be displayed.
///
///
...
@@ -3361,7 +3330,6 @@ class InputDecoration {
...
@@ -3361,7 +3330,6 @@ class InputDecoration {
String
?
errorText
,
String
?
errorText
,
TextStyle
?
errorStyle
,
TextStyle
?
errorStyle
,
int
?
errorMaxLines
,
int
?
errorMaxLines
,
bool
?
hasFloatingPlaceholder
,
FloatingLabelBehavior
?
floatingLabelBehavior
,
FloatingLabelBehavior
?
floatingLabelBehavior
,
bool
?
isCollapsed
,
bool
?
isCollapsed
,
bool
?
isDense
,
bool
?
isDense
,
...
@@ -3408,7 +3376,6 @@ class InputDecoration {
...
@@ -3408,7 +3376,6 @@ class InputDecoration {
errorText:
errorText
??
this
.
errorText
,
errorText:
errorText
??
this
.
errorText
,
errorStyle:
errorStyle
??
this
.
errorStyle
,
errorStyle:
errorStyle
??
this
.
errorStyle
,
errorMaxLines:
errorMaxLines
??
this
.
errorMaxLines
,
errorMaxLines:
errorMaxLines
??
this
.
errorMaxLines
,
hasFloatingPlaceholder:
hasFloatingPlaceholder
??
this
.
hasFloatingPlaceholder
,
floatingLabelBehavior:
floatingLabelBehavior
??
this
.
floatingLabelBehavior
,
floatingLabelBehavior:
floatingLabelBehavior
??
this
.
floatingLabelBehavior
,
isCollapsed:
isCollapsed
??
this
.
isCollapsed
,
isCollapsed:
isCollapsed
??
this
.
isCollapsed
,
isDense:
isDense
??
this
.
isDense
,
isDense:
isDense
??
this
.
isDense
,
...
@@ -3456,7 +3423,6 @@ class InputDecoration {
...
@@ -3456,7 +3423,6 @@ class InputDecoration {
hintStyle:
hintStyle
??
theme
.
hintStyle
,
hintStyle:
hintStyle
??
theme
.
hintStyle
,
errorStyle:
errorStyle
??
theme
.
errorStyle
,
errorStyle:
errorStyle
??
theme
.
errorStyle
,
errorMaxLines:
errorMaxLines
??
theme
.
errorMaxLines
,
errorMaxLines:
errorMaxLines
??
theme
.
errorMaxLines
,
hasFloatingPlaceholder:
hasFloatingPlaceholder
,
floatingLabelBehavior:
floatingLabelBehavior
??
theme
.
floatingLabelBehavior
,
floatingLabelBehavior:
floatingLabelBehavior
??
theme
.
floatingLabelBehavior
,
isCollapsed:
isCollapsed
,
isCollapsed:
isCollapsed
,
isDense:
isDense
??
theme
.
isDense
,
isDense:
isDense
??
theme
.
isDense
,
...
@@ -3499,7 +3465,6 @@ class InputDecoration {
...
@@ -3499,7 +3465,6 @@ class InputDecoration {
&&
other
.
errorText
==
errorText
&&
other
.
errorText
==
errorText
&&
other
.
errorStyle
==
errorStyle
&&
other
.
errorStyle
==
errorStyle
&&
other
.
errorMaxLines
==
errorMaxLines
&&
other
.
errorMaxLines
==
errorMaxLines
&&
other
.
hasFloatingPlaceholder
==
hasFloatingPlaceholder
&&
other
.
floatingLabelBehavior
==
floatingLabelBehavior
&&
other
.
floatingLabelBehavior
==
floatingLabelBehavior
&&
other
.
isDense
==
isDense
&&
other
.
isDense
==
isDense
&&
other
.
contentPadding
==
contentPadding
&&
other
.
contentPadding
==
contentPadding
...
@@ -3549,7 +3514,6 @@ class InputDecoration {
...
@@ -3549,7 +3514,6 @@ class InputDecoration {
errorText
,
errorText
,
errorStyle
,
errorStyle
,
errorMaxLines
,
errorMaxLines
,
hasFloatingPlaceholder
,
floatingLabelBehavior
,
floatingLabelBehavior
,
isDense
,
isDense
,
contentPadding
,
contentPadding
,
...
@@ -3599,7 +3563,6 @@ class InputDecoration {
...
@@ -3599,7 +3563,6 @@ class InputDecoration {
if
(
errorText
!=
null
)
'errorText: "
$errorText
"'
,
if
(
errorText
!=
null
)
'errorText: "
$errorText
"'
,
if
(
errorStyle
!=
null
)
'errorStyle: "
$errorStyle
"'
,
if
(
errorStyle
!=
null
)
'errorStyle: "
$errorStyle
"'
,
if
(
errorMaxLines
!=
null
)
'errorMaxLines: "
$errorMaxLines
"'
,
if
(
errorMaxLines
!=
null
)
'errorMaxLines: "
$errorMaxLines
"'
,
if
(
hasFloatingPlaceholder
==
false
)
'hasFloatingPlaceholder: false'
,
if
(
floatingLabelBehavior
!=
null
)
'floatingLabelBehavior:
$floatingLabelBehavior
'
,
if
(
floatingLabelBehavior
!=
null
)
'floatingLabelBehavior:
$floatingLabelBehavior
'
,
if
(
isDense
??
false
)
'isDense:
$isDense
'
,
if
(
isDense
??
false
)
'isDense:
$isDense
'
,
if
(
contentPadding
!=
null
)
'contentPadding:
$contentPadding
'
,
if
(
contentPadding
!=
null
)
'contentPadding:
$contentPadding
'
,
...
@@ -3659,11 +3622,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -3659,11 +3622,6 @@ class InputDecorationTheme with Diagnosticable {
this
.
hintStyle
,
this
.
hintStyle
,
this
.
errorStyle
,
this
.
errorStyle
,
this
.
errorMaxLines
,
this
.
errorMaxLines
,
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
this
.
hasFloatingPlaceholder
=
true
,
this
.
floatingLabelBehavior
=
FloatingLabelBehavior
.
auto
,
this
.
floatingLabelBehavior
=
FloatingLabelBehavior
.
auto
,
this
.
isDense
=
false
,
this
.
isDense
=
false
,
this
.
contentPadding
,
this
.
contentPadding
,
...
@@ -3686,11 +3644,7 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -3686,11 +3644,7 @@ class InputDecorationTheme with Diagnosticable {
})
:
assert
(
isDense
!=
null
),
})
:
assert
(
isDense
!=
null
),
assert
(
isCollapsed
!=
null
),
assert
(
isCollapsed
!=
null
),
assert
(
filled
!=
null
),
assert
(
filled
!=
null
),
assert
(
alignLabelWithHint
!=
null
),
assert
(
alignLabelWithHint
!=
null
);
assert
(
!(!
hasFloatingPlaceholder
&&
identical
(
floatingLabelBehavior
,
FloatingLabelBehavior
.
always
)),
'hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always'
,
);
/// The style to use for [InputDecoration.labelText] when the label is
/// The style to use for [InputDecoration.labelText] when the label is
/// above (i.e., vertically adjacent to) the input field.
/// above (i.e., vertically adjacent to) the input field.
...
@@ -3748,20 +3702,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -3748,20 +3702,6 @@ class InputDecorationTheme with Diagnosticable {
/// * [helperMaxLines], the equivalent but for the [InputDecoration.helperText].
/// * [helperMaxLines], the equivalent but for the [InputDecoration.helperText].
final
int
?
errorMaxLines
;
final
int
?
errorMaxLines
;
/// Whether the placeholder text floats to become a label on focus.
///
/// If this is false, the placeholder disappears when the input has focus or
/// text has been entered.
/// If this is true, the placeholder will rise to the top of the input when
/// the input has focus or text has been entered.
///
/// Defaults to true.
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
final
bool
hasFloatingPlaceholder
;
/// {@macro flutter.material.inputDecoration.floatingLabelBehavior}
/// {@macro flutter.material.inputDecoration.floatingLabelBehavior}
///
///
/// Defaults to [FloatingLabelBehavior.auto].
/// Defaults to [FloatingLabelBehavior.auto].
...
@@ -4030,11 +3970,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -4030,11 +3970,6 @@ class InputDecorationTheme with Diagnosticable {
TextStyle
?
hintStyle
,
TextStyle
?
hintStyle
,
TextStyle
?
errorStyle
,
TextStyle
?
errorStyle
,
int
?
errorMaxLines
,
int
?
errorMaxLines
,
@Deprecated
(
'Use floatingLabelBehavior instead. '
'This feature was deprecated after v1.13.2.'
,
)
bool
?
hasFloatingPlaceholder
,
FloatingLabelBehavior
?
floatingLabelBehavior
,
FloatingLabelBehavior
?
floatingLabelBehavior
,
bool
?
isDense
,
bool
?
isDense
,
EdgeInsetsGeometry
?
contentPadding
,
EdgeInsetsGeometry
?
contentPadding
,
...
@@ -4062,7 +3997,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -4062,7 +3997,6 @@ class InputDecorationTheme with Diagnosticable {
hintStyle:
hintStyle
??
this
.
hintStyle
,
hintStyle:
hintStyle
??
this
.
hintStyle
,
errorStyle:
errorStyle
??
this
.
errorStyle
,
errorStyle:
errorStyle
??
this
.
errorStyle
,
errorMaxLines:
errorMaxLines
??
this
.
errorMaxLines
,
errorMaxLines:
errorMaxLines
??
this
.
errorMaxLines
,
hasFloatingPlaceholder:
hasFloatingPlaceholder
??
this
.
hasFloatingPlaceholder
,
floatingLabelBehavior:
floatingLabelBehavior
??
this
.
floatingLabelBehavior
,
floatingLabelBehavior:
floatingLabelBehavior
??
this
.
floatingLabelBehavior
,
isDense:
isDense
??
this
.
isDense
,
isDense:
isDense
??
this
.
isDense
,
contentPadding:
contentPadding
??
this
.
contentPadding
,
contentPadding:
contentPadding
??
this
.
contentPadding
,
...
@@ -4094,7 +4028,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -4094,7 +4028,6 @@ class InputDecorationTheme with Diagnosticable {
hintStyle
,
hintStyle
,
errorStyle
,
errorStyle
,
errorMaxLines
,
errorMaxLines
,
hasFloatingPlaceholder
,
floatingLabelBehavior
,
floatingLabelBehavior
,
isDense
,
isDense
,
contentPadding
,
contentPadding
,
...
@@ -4162,7 +4095,6 @@ class InputDecorationTheme with Diagnosticable {
...
@@ -4162,7 +4095,6 @@ class InputDecorationTheme with Diagnosticable {
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'hintStyle'
,
hintStyle
,
defaultValue:
defaultTheme
.
hintStyle
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'hintStyle'
,
hintStyle
,
defaultValue:
defaultTheme
.
hintStyle
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'errorStyle'
,
errorStyle
,
defaultValue:
defaultTheme
.
errorStyle
));
properties
.
add
(
DiagnosticsProperty
<
TextStyle
>(
'errorStyle'
,
errorStyle
,
defaultValue:
defaultTheme
.
errorStyle
));
properties
.
add
(
IntProperty
(
'errorMaxLines'
,
errorMaxLines
,
defaultValue:
defaultTheme
.
errorMaxLines
));
properties
.
add
(
IntProperty
(
'errorMaxLines'
,
errorMaxLines
,
defaultValue:
defaultTheme
.
errorMaxLines
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'hasFloatingPlaceholder'
,
hasFloatingPlaceholder
,
defaultValue:
defaultTheme
.
hasFloatingPlaceholder
));
properties
.
add
(
DiagnosticsProperty
<
FloatingLabelBehavior
>(
'floatingLabelBehavior'
,
floatingLabelBehavior
,
defaultValue:
defaultTheme
.
floatingLabelBehavior
));
properties
.
add
(
DiagnosticsProperty
<
FloatingLabelBehavior
>(
'floatingLabelBehavior'
,
floatingLabelBehavior
,
defaultValue:
defaultTheme
.
floatingLabelBehavior
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'isDense'
,
isDense
,
defaultValue:
defaultTheme
.
isDense
));
properties
.
add
(
DiagnosticsProperty
<
bool
>(
'isDense'
,
isDense
,
defaultValue:
defaultTheme
.
isDense
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'contentPadding'
,
contentPadding
,
defaultValue:
defaultTheme
.
contentPadding
));
properties
.
add
(
DiagnosticsProperty
<
EdgeInsetsGeometry
>(
'contentPadding'
,
contentPadding
,
defaultValue:
defaultTheme
.
contentPadding
));
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
7773d0b0
...
@@ -2894,7 +2894,7 @@ void main() {
...
@@ -2894,7 +2894,7 @@ void main() {
isEmpty:
true
,
isEmpty:
true
,
decoration:
const
InputDecoration
(
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
),
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
),
hasFloatingPlaceholder:
false
,
floatingLabelBehavior:
FloatingLabelBehavior
.
never
,
labelText:
'label'
,
labelText:
'label'
,
),
),
),
),
...
@@ -2918,7 +2918,7 @@ void main() {
...
@@ -2918,7 +2918,7 @@ void main() {
// isFocused: false (default)
// isFocused: false (default)
decoration:
const
InputDecoration
(
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
),
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
),
hasFloatingPlaceholder:
false
,
floatingLabelBehavior:
FloatingLabelBehavior
.
never
,
labelText:
'label'
,
labelText:
'label'
,
),
),
),
),
...
@@ -4094,7 +4094,6 @@ void main() {
...
@@ -4094,7 +4094,6 @@ void main() {
helperMaxLines:
6
,
helperMaxLines:
6
,
hintStyle:
TextStyle
(),
hintStyle:
TextStyle
(),
errorMaxLines:
5
,
errorMaxLines:
5
,
hasFloatingPlaceholder:
false
,
floatingLabelBehavior:
FloatingLabelBehavior
.
never
,
floatingLabelBehavior:
FloatingLabelBehavior
.
never
,
contentPadding:
EdgeInsetsDirectional
.
only
(
start:
40.0
,
top:
12.0
,
bottom:
12.0
),
contentPadding:
EdgeInsetsDirectional
.
only
(
start:
40.0
,
top:
12.0
,
bottom:
12.0
),
prefixStyle:
TextStyle
(),
prefixStyle:
TextStyle
(),
...
@@ -4120,7 +4119,6 @@ void main() {
...
@@ -4120,7 +4119,6 @@ void main() {
'helperMaxLines: 6'
,
'helperMaxLines: 6'
,
'hintStyle: TextStyle(<all styles inherited>)'
,
'hintStyle: TextStyle(<all styles inherited>)'
,
'errorMaxLines: 5'
,
'errorMaxLines: 5'
,
'hasFloatingPlaceholder: false'
,
'floatingLabelBehavior: FloatingLabelBehavior.never'
,
'floatingLabelBehavior: FloatingLabelBehavior.never'
,
'contentPadding: EdgeInsetsDirectional(40.0, 12.0, 0.0, 12.0)'
,
'contentPadding: EdgeInsetsDirectional(40.0, 12.0, 0.0, 12.0)'
,
'prefixStyle: TextStyle(<all styles inherited>)'
,
'prefixStyle: TextStyle(<all styles inherited>)'
,
...
...
packages/flutter/test_fixes/material.dart
View file @
7773d0b0
...
@@ -194,6 +194,9 @@ void main() {
...
@@ -194,6 +194,9 @@ void main() {
InputDecorationTheme
(
hasFloatingPlaceholder:
false
);
InputDecorationTheme
(
hasFloatingPlaceholder:
false
);
InputDecorationTheme
();
InputDecorationTheme
();
inputDecorationTheme
.
hasFloatingPlaceholder
;
inputDecorationTheme
.
hasFloatingPlaceholder
;
inputDecorationTheme
.
copyWith
(
hasFloatingPlaceholder:
false
);
inputDecorationTheme
.
copyWith
(
hasFloatingPlaceholder:
true
);
inputDecorationTheme
.
copyWith
();
// Changes made in https://github.com/flutter/flutter/pull/66482
// Changes made in https://github.com/flutter/flutter/pull/66482
ThemeData
(
textSelectionColor:
Colors
.
red
);
ThemeData
(
textSelectionColor:
Colors
.
red
);
...
...
packages/flutter/test_fixes/material.dart.expect
View file @
7773d0b0
...
@@ -194,6 +194,9 @@ void main() {
...
@@ -194,6 +194,9 @@ void main() {
InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never);
InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never);
InputDecorationTheme();
InputDecorationTheme();
inputDecorationTheme.floatingLabelBehavior;
inputDecorationTheme.floatingLabelBehavior;
inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.never);
inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.auto);
inputDecorationTheme.copyWith();
// Changes made in https://github.com/flutter/flutter/pull/66482
// Changes made in https://github.com/flutter/flutter/pull/66482
ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red));
ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red));
...
...
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