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
2ed8a50e
Unverified
Commit
2ed8a50e
authored
Aug 20, 2018
by
Hans Muller
Committed by
GitHub
Aug 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix (another) typo in InputDecorationTheme.debugFillProperties() (#20759)
parent
13120d34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+1
-1
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+38
-1
No files found.
packages/flutter/lib/src/material/input_decorator.dart
View file @
2ed8a50e
...
@@ -2931,7 +2931,7 @@ class InputDecorationTheme extends Diagnosticable {
...
@@ -2931,7 +2931,7 @@ class InputDecorationTheme extends Diagnosticable {
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'errorStyle'
,
errorStyle
,
defaultValue:
defaultTheme
.
errorStyle
));
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'errorStyle'
,
errorStyle
,
defaultValue:
defaultTheme
.
errorStyle
));
properties
.
add
(
new
DiagnosticsProperty
<
int
>(
'errorMaxLines'
,
errorMaxLines
,
defaultValue:
defaultTheme
.
errorMaxLines
));
properties
.
add
(
new
DiagnosticsProperty
<
int
>(
'errorMaxLines'
,
errorMaxLines
,
defaultValue:
defaultTheme
.
errorMaxLines
));
properties
.
add
(
new
DiagnosticsProperty
<
bool
>(
'isDense'
,
isDense
,
defaultValue:
defaultTheme
.
isDense
));
properties
.
add
(
new
DiagnosticsProperty
<
bool
>(
'isDense'
,
isDense
,
defaultValue:
defaultTheme
.
isDense
));
properties
.
add
(
new
DiagnosticsProperty
<
EdgeInsets
Directional
>(
'contentPadding'
,
contentPadding
,
defaultValue:
defaultTheme
.
contentPadding
));
properties
.
add
(
new
DiagnosticsProperty
<
EdgeInsets
Geometry
>(
'contentPadding'
,
contentPadding
,
defaultValue:
defaultTheme
.
contentPadding
));
properties
.
add
(
new
DiagnosticsProperty
<
bool
>(
'isCollapsed'
,
isCollapsed
,
defaultValue:
defaultTheme
.
isCollapsed
));
properties
.
add
(
new
DiagnosticsProperty
<
bool
>(
'isCollapsed'
,
isCollapsed
,
defaultValue:
defaultTheme
.
isCollapsed
));
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'prefixStyle'
,
prefixStyle
,
defaultValue:
defaultTheme
.
prefixStyle
));
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'prefixStyle'
,
prefixStyle
,
defaultValue:
defaultTheme
.
prefixStyle
));
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'suffixStyle'
,
suffixStyle
,
defaultValue:
defaultTheme
.
suffixStyle
));
properties
.
add
(
new
DiagnosticsProperty
<
TextStyle
>(
'suffixStyle'
,
suffixStyle
,
defaultValue:
defaultTheme
.
suffixStyle
));
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
2ed8a50e
...
@@ -1697,13 +1697,50 @@ void main() {
...
@@ -1697,13 +1697,50 @@ void main() {
testWidgets
(
'InputDecorationTheme.toString()'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'InputDecorationTheme.toString()'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/19305
// Regression test for https://github.com/flutter/flutter/issues/19305
expect
(
expect
(
const
InputDecorationTheme
(
const
InputDecorationTheme
(
contentPadding:
EdgeInsetsDirectional
.
only
(
start:
5.0
),
contentPadding:
EdgeInsetsDirectional
.
only
(
start:
5.0
),
).
toString
(),
).
toString
(),
contains
(
'contentPadding: EdgeInsetsDirectional(5.0, 0.0, 0.0, 0.0)'
),
contains
(
'contentPadding: EdgeInsetsDirectional(5.0, 0.0, 0.0, 0.0)'
),
);
);
// Regression test for https://github.com/flutter/flutter/issues/20374
expect
(
const
InputDecorationTheme
(
contentPadding:
EdgeInsets
.
only
(
left:
5.0
),
).
toString
(),
contains
(
'contentPadding: EdgeInsets(5.0, 0.0, 0.0, 0.0)'
),
);
// Verify that the toString() method succeeds.
final
String
debugString
=
const
InputDecorationTheme
(
labelStyle:
TextStyle
(
height:
1.0
),
helperStyle:
TextStyle
(
height:
2.0
),
hintStyle:
TextStyle
(
height:
3.0
),
errorStyle:
TextStyle
(
height:
4.0
),
errorMaxLines:
5
,
isDense:
true
,
contentPadding:
EdgeInsets
.
only
(
right:
6.0
),
isCollapsed:
true
,
prefixStyle:
TextStyle
(
height:
7.0
),
suffixStyle:
TextStyle
(
height:
8.0
),
counterStyle:
TextStyle
(
height:
9.0
),
filled:
true
,
fillColor:
Color
(
10
),
errorBorder:
UnderlineInputBorder
(),
focusedBorder:
OutlineInputBorder
(),
focusedErrorBorder:
UnderlineInputBorder
(),
disabledBorder:
OutlineInputBorder
(),
enabledBorder:
UnderlineInputBorder
(),
border:
OutlineInputBorder
(),
).
toString
();
// Spot check
expect
(
debugString
,
contains
(
'labelStyle: TextStyle(inherit: true, height: 1.0x)'
));
expect
(
debugString
,
contains
(
'isDense: true'
));
expect
(
debugString
,
contains
(
'fillColor: Color(0x0000000a)'
));
expect
(
debugString
,
contains
(
'errorBorder: UnderlineInputBorder()'
));
expect
(
debugString
,
contains
(
'focusedBorder: OutlineInputBorder()'
));
});
});
testWidgets
(
'InputDecoration borders'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'InputDecoration borders'
,
(
WidgetTester
tester
)
async
{
...
...
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