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
3dbe7f23
Unverified
Commit
3dbe7f23
authored
Apr 07, 2021
by
c1yde3
Committed by
GitHub
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cupertino refresh control style (#79842)
parent
a2f67720
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
refresh.dart
packages/flutter/lib/src/cupertino/refresh.dart
+1
-1
refresh_test.dart
packages/flutter/test/cupertino/refresh_test.dart
+20
-0
No files found.
packages/flutter/lib/src/cupertino/refresh.dart
View file @
3dbe7f23
...
...
@@ -420,7 +420,7 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
double
refreshTriggerPullDistance
,
double
refreshIndicatorExtent
,
)
{
final
double
percentageComplete
=
pulledExtent
/
refreshTriggerPullDistance
;
final
double
percentageComplete
=
(
pulledExtent
/
refreshTriggerPullDistance
).
clamp
(
0.0
,
1.0
)
;
// Place the indicator at the top of the sliver that opens up. Note that we're using
// a Stack/Positioned widget because the CupertinoActivityIndicator does some internal
...
...
packages/flutter/test/cupertino/refresh_test.dart
View file @
3dbe7f23
...
...
@@ -1322,6 +1322,26 @@ void main() {
);
expect
(
tester
.
widget
<
CupertinoActivityIndicator
>(
find
.
byType
(
CupertinoActivityIndicator
)).
progress
,
100.0
/
100.0
);
});
testWidgets
(
'indicator should not become larger when overscrolled'
,
(
WidgetTester
tester
)
async
{
// test for https://github.com/flutter/flutter/issues/79841
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Builder
(
builder:
(
BuildContext
context
)
{
return
CupertinoSliverRefreshControl
.
buildRefreshIndicator
(
context
,
RefreshIndicatorMode
.
done
,
120
,
100
,
10
,
);
},
),
),
);
expect
(
tester
.
widget
<
CupertinoActivityIndicator
>(
find
.
byType
(
CupertinoActivityIndicator
)).
radius
,
14.0
);
});
}
group
(
'UI tests long list'
,
uiTestGroup
);
...
...
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