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
7a3c0a2e
Commit
7a3c0a2e
authored
Jul 18, 2016
by
Hans Muller
Committed by
GitHub
Jul 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw a smoother overscroll indicator on Android (#4945)
parent
773f4042
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
item.dart
examples/flutter_gallery/lib/gallery/item.dart
+1
-1
overscroll_indicator.dart
packages/flutter/lib/src/material/overscroll_indicator.dart
+5
-5
No files found.
examples/flutter_gallery/lib/gallery/item.dart
View file @
7a3c0a2e
...
...
@@ -200,7 +200,7 @@ final List<GalleryItem> kAllGalleryItems = <GalleryItem>[
),
new
GalleryItem
(
title:
'Tabs'
,
subtitle:
'Tabs with indepdently scrollable views'
,
subtitle:
'Tabs with indep
en
dently scrollable views'
,
routeName:
TabsDemo
.
routeName
,
buildRoute:
(
BuildContext
context
)
=>
new
TabsDemo
()
),
...
...
packages/flutter/lib/src/material/overscroll_indicator.dart
View file @
7a3c0a2e
...
...
@@ -31,7 +31,7 @@ class _Painter extends CustomPainter {
void
paintIndicator
(
Canvas
canvas
,
Size
size
)
{
final
double
rectBias
=
extent
/
2.0
;
final
double
arcBias
=
extent
;
final
double
arcBias
=
extent
*
0.66
;
final
Path
path
=
new
Path
();
switch
(
scrollDirection
)
{
...
...
@@ -41,12 +41,12 @@ class _Painter extends CustomPainter {
path
.
moveTo
(
0.0
,
0.0
);
path
.
relativeLineTo
(
width
,
0.0
);
path
.
relativeLineTo
(
0.0
,
rectBias
);
path
.
relative
QuadraticBezierTo
(
width
/
-
2.0
,
arcBias
,
-
width
,
0.0
);
path
.
relative
CubicTo
(
width
*
-
0.25
,
arcBias
,
width
*
-
0.75
,
arcBias
,
-
width
,
0.0
);
}
else
{
path
.
moveTo
(
0.0
,
size
.
height
);
path
.
relativeLineTo
(
width
,
0.0
);
path
.
relativeLineTo
(
0.0
,
-
rectBias
);
path
.
relative
QuadraticBezierTo
(
width
/
-
2.0
,
-
arcBias
,
-
width
,
0.0
);
path
.
relative
CubicTo
(
width
*
-
0.25
,
-
arcBias
,
width
*
-
0.75
,
-
arcBias
,
-
width
,
0.0
);
}
break
;
case
Axis
.
horizontal
:
...
...
@@ -55,12 +55,12 @@ class _Painter extends CustomPainter {
path
.
moveTo
(
0.0
,
0.0
);
path
.
relativeLineTo
(
0.0
,
height
);
path
.
relativeLineTo
(
rectBias
,
0.0
);
path
.
relative
QuadraticBezierTo
(
arcBias
,
height
/
-
2.0
,
0.0
,
-
height
);
path
.
relative
CubicTo
(
arcBias
,
height
*
-
0.25
,
arcBias
,
height
*
-
0.75
,
0.0
,
-
height
);
}
else
{
path
.
moveTo
(
size
.
width
,
0.0
);
path
.
relativeLineTo
(
0.0
,
height
);
path
.
relativeLineTo
(-
rectBias
,
0.0
);
path
.
relative
QuadraticBezierTo
(-
arcBias
,
height
/
-
2.0
,
0.0
,
-
height
);
path
.
relative
CubicTo
(-
arcBias
,
height
*
-
0.25
,
-
arcBias
,
height
*
-
0.75
,
0.0
,
-
height
);
}
break
;
}
...
...
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