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
c262126c
Unverified
Commit
c262126c
authored
Aug 09, 2022
by
xubaolin
Committed by
GitHub
Aug 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DraggableScrollableSheet and ListView has tiny scroll of one pixel (#109081)
parent
e527dcea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
15 deletions
+1
-15
draggable_scrollable_sheet.dart
...s/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
+1
-14
bottom_sheet_test.dart
packages/flutter/test/material/bottom_sheet_test.dart
+0
-1
No files found.
packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
View file @
c262126c
...
...
@@ -538,8 +538,6 @@ class _DraggableSheetExtent {
double
get
currentSize
=>
_currentSize
.
value
;
double
get
currentPixels
=>
sizeToPixels
(
_currentSize
.
value
);
double
get
additionalMinSize
=>
isAtMin
?
0.0
:
1.0
;
double
get
additionalMaxSize
=>
isAtMax
?
0.0
:
1.0
;
List
<
double
>
get
pixelSnapSizes
=>
snapSizes
.
map
(
sizeToPixels
).
toList
();
/// Start an activity that affects the sheet and register a cancel call back
...
...
@@ -795,7 +793,7 @@ class _DraggableScrollableSheetScrollController extends ScrollController {
ScrollPosition
?
oldPosition
,
)
{
return
_DraggableScrollableSheetScrollPosition
(
physics:
physics
,
physics:
const
AlwaysScrollableScrollPhysics
().
applyTo
(
physics
)
,
context:
context
,
oldPosition:
oldPosition
,
getExtent:
()
=>
extent
,
...
...
@@ -887,17 +885,6 @@ class _DraggableScrollableSheetScrollPosition extends ScrollPositionWithSingleCo
super
.
beginActivity
(
newActivity
);
}
@override
bool
applyContentDimensions
(
double
minScrollSize
,
double
maxScrollSize
)
{
// We need to provide some extra size if we haven't yet reached the max or
// min sizes. Otherwise, a list with fewer children than the size of
// the available space will get stuck.
return
super
.
applyContentDimensions
(
minScrollSize
-
extent
.
additionalMinSize
,
maxScrollSize
+
extent
.
additionalMaxSize
,
);
}
@override
void
applyUserOffset
(
double
delta
)
{
if
(!
listShouldScroll
&&
...
...
packages/flutter/test/material/bottom_sheet_test.dart
View file @
c262126c
...
...
@@ -879,7 +879,6 @@ void main() {
children:
<
TestSemantics
>[
TestSemantics
(
flags:
<
SemanticsFlag
>[
SemanticsFlag
.
hasImplicitScrolling
],
actions:
<
SemanticsAction
>[
SemanticsAction
.
scrollDown
,
SemanticsAction
.
scrollUp
],
children:
<
TestSemantics
>[
TestSemantics
(
label:
'BottomSheet'
,
...
...
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