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
4f569fb3
Unverified
Commit
4f569fb3
authored
Mar 15, 2021
by
LongCatIsLooong
Committed by
GitHub
Mar 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CupertinoTextField to show disabled background color when decoration is null (#78140)
parent
5e84b1c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
text_field.dart
packages/flutter/lib/src/cupertino/text_field.dart
+1
-0
text_field_test.dart
packages/flutter/test/cupertino/text_field_test.dart
+24
-0
No files found.
packages/flutter/lib/src/cupertino/text_field.dart
View file @
4f569fb3
...
...
@@ -1216,6 +1216,7 @@ class _CupertinoTextFieldState extends State<CupertinoTextField> with Restoratio
ignoring:
!
enabled
,
child:
Container
(
decoration:
effectiveDecoration
,
color:
!
enabled
&&
effectiveDecoration
==
null
?
disabledColor
:
null
,
child:
_selectionGestureDetectorBuilder
.
buildGestureDetector
(
behavior:
HitTestBehavior
.
translucent
,
child:
Align
(
...
...
packages/flutter/test/cupertino/text_field_test.dart
View file @
4f569fb3
...
...
@@ -4695,4 +4695,28 @@ void main() {
0xFF050505
,
);
});
// Regression test for https://github.com/flutter/flutter/issues/78097.
testWidgets
(
'still gets disabled background color when decoration is null'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
CupertinoApp
(
home:
Center
(
child:
CupertinoTextField
(
decoration:
null
,
enabled:
false
,
),
),
),
);
final
Color
disabledColor
=
tester
.
widget
<
ColoredBox
>(
find
.
descendant
(
of:
find
.
byType
(
CupertinoTextField
),
matching:
find
.
byType
(
ColoredBox
),
),
).
color
;
expect
(
disabledColor
,
isSameColorAs
(
const
Color
(
0xFFFAFAFA
)));
});
}
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