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
19b47c2d
Unverified
Commit
19b47c2d
authored
Sep 14, 2019
by
LongCatIsLooong
Committed by
GitHub
Sep 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dark Mode R: Refresh Control (#40454)
parent
ab455104
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
+54
-7
colors.dart
packages/flutter/lib/src/cupertino/colors.dart
+6
-3
refresh.dart
packages/flutter/lib/src/cupertino/refresh.dart
+2
-2
refresh_test.dart
packages/flutter/test/cupertino/refresh_test.dart
+44
-0
editable_text_cursor_test.dart
packages/flutter/test/widgets/editable_text_cursor_test.dart
+2
-2
No files found.
packages/flutter/lib/src/cupertino/colors.dart
View file @
19b47c2d
...
...
@@ -75,13 +75,16 @@ class CupertinoColors {
// Value derived from screenshot from the dark themed Apple Watch app.
static
const
Color
darkBackgroundGray
=
Color
(
0xFF171717
);
/// Used in iOS 1
1
for unselected selectables such as tab bar items in their
/// Used in iOS 1
3
for unselected selectables such as tab bar items in their
/// inactive state or de-emphasized subtitles and details text.
///
/// Not the same gray as disabled buttons etc.
///
/// This is SystemGrayColor in the iOS palette.
static
const
Color
inactiveGray
=
Color
(
0xFF8E8E93
);
/// This is the disabled color in the iOS palette.
static
const
Color
inactiveGray
=
CupertinoDynamicColor
.
withBrightness
(
color:
Color
(
0xFF999999
),
darkColor:
Color
(
0xFF757575
),
);
/// Used for iOS 10 for destructive actions such as the delete actions in
/// table view cells and dialogs.
...
...
packages/flutter/lib/src/cupertino/refresh.dart
View file @
19b47c2d
...
...
@@ -379,9 +379,9 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
opacity:
opacityCurve
.
transform
(
min
(
pulledExtent
/
refreshTriggerPullDistance
,
1.0
)
),
child:
const
Icon
(
child:
Icon
(
CupertinoIcons
.
down_arrow
,
color:
Cupertino
Colors
.
inactiveGray
,
color:
Cupertino
DynamicColor
.
resolve
(
CupertinoColors
.
inactiveGray
,
context
)
,
size:
36.0
,
),
)
...
...
packages/flutter/test/cupertino/refresh_test.dart
View file @
19b47c2d
...
...
@@ -1403,6 +1403,50 @@ void main() {
debugDefaultTargetPlatformOverride
=
null
;
},
);
testWidgets
(
'buildSimpleRefreshIndicator dark mode'
,
(
WidgetTester
tester
)
async
{
const
CupertinoDynamicColor
color
=
CupertinoColors
.
inactiveGray
;
await
tester
.
pumpWidget
(
MediaQuery
(
data:
const
MediaQueryData
(
platformBrightness:
Brightness
.
light
),
child:
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Builder
(
builder:
(
BuildContext
context
)
{
return
CupertinoSliverRefreshControl
.
buildSimpleRefreshIndicator
(
context
,
RefreshIndicatorMode
.
drag
,
10
,
10
,
10
,
);
},
),
),
),
);
expect
(
tester
.
widget
<
Icon
>(
find
.
byType
(
Icon
)).
color
.
value
,
color
.
color
.
value
);
await
tester
.
pumpWidget
(
MediaQuery
(
data:
const
MediaQueryData
(
platformBrightness:
Brightness
.
dark
),
child:
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Builder
(
builder:
(
BuildContext
context
)
{
return
CupertinoSliverRefreshControl
.
buildSimpleRefreshIndicator
(
context
,
RefreshIndicatorMode
.
drag
,
10
,
10
,
10
,
);
},
),
),
),
);
expect
(
tester
.
widget
<
Icon
>(
find
.
byType
(
Icon
)).
color
.
value
,
color
.
darkColor
.
value
);
});
};
group
(
'UI tests long list'
,
uiTestGroup
);
...
...
packages/flutter/test/widgets/editable_text_cursor_test.dart
View file @
19b47c2d
...
...
@@ -699,7 +699,7 @@ void main() {
const
Rect
.
fromLTRB
(
463.3333435058594
,
-
0.916666666666668
,
465.3333435058594
,
17.083333015441895
),
const
Radius
.
circular
(
2.0
),
),
color:
const
Color
(
0xff
8e8e93
),
color:
const
Color
(
0xff
999999
),
)
..
rrect
(
rrect:
RRect
.
fromRectAndRadius
(
...
...
@@ -724,7 +724,7 @@ void main() {
const
Rect
.
fromLTRB
(
191.3333282470703
,
-
0.916666666666668
,
193.3333282470703
,
17.083333015441895
),
const
Radius
.
circular
(
2.0
),
),
color:
const
Color
(
0xff
8e8e93
),
color:
const
Color
(
0xff
999999
),
)
..
rrect
(
rrect:
RRect
.
fromRectAndRadius
(
...
...
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