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
ff1d3b81
Commit
ff1d3b81
authored
May 24, 2016
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clamp AppBar scroll notifications when ClampOverscrolls is true (#4152)
parent
3b3db78f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+11
-5
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
ff1d3b81
...
...
@@ -547,11 +547,17 @@ class ScaffoldState extends State<Scaffold> {
final
ScrollableState
scrollable
=
notification
.
scrollable
;
if
((
scrollable
.
config
.
scrollDirection
==
Axis
.
vertical
)
&&
(
config
.
scrollableKey
==
null
||
config
.
scrollableKey
==
scrollable
.
config
.
key
))
{
final
double
newScrollOffset
=
scrollable
.
scrollOffset
;
setState
(()
{
_scrollOffsetDelta
=
_scrollOffset
-
newScrollOffset
;
_scrollOffset
=
newScrollOffset
;
});
double
newScrollOffset
=
scrollable
.
scrollOffset
;
if
(
ClampOverscrolls
.
of
(
scrollable
.
context
))
{
ExtentScrollBehavior
limits
=
scrollable
.
scrollBehavior
;
newScrollOffset
=
newScrollOffset
.
clamp
(
limits
.
minScrollOffset
,
limits
.
maxScrollOffset
);
}
if
(
_scrollOffset
!=
newScrollOffset
)
{
setState
(()
{
_scrollOffsetDelta
=
_scrollOffset
-
newScrollOffset
;
_scrollOffset
=
newScrollOffset
;
});
}
}
return
false
;
}
...
...
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