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
e55b7ca0
Unverified
Commit
e55b7ca0
authored
Sep 15, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Sep 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nullability of ScrollMetrics (#65861)
parent
ca2ecf75
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
list_wheel_scroll_view.dart
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
+12
-12
nested_scroll_view.dart
packages/flutter/lib/src/widgets/nested_scroll_view.dart
+8
-8
page_view.dart
packages/flutter/lib/src/widgets/page_view.dart
+12
-12
No files found.
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
View file @
e55b7ca0
...
...
@@ -308,10 +308,10 @@ class FixedExtentMetrics extends FixedScrollMetrics {
/// Creates an immutable snapshot of values associated with a
/// [ListWheelScrollView].
FixedExtentMetrics
({
required
double
minScrollExtent
,
required
double
maxScrollExtent
,
required
double
pixels
,
required
double
viewportDimension
,
required
double
?
minScrollExtent
,
required
double
?
maxScrollExtent
,
required
double
?
pixels
,
required
double
?
viewportDimension
,
required
AxisDirection
axisDirection
,
required
this
.
itemIndex
,
})
:
super
(
...
...
@@ -332,10 +332,10 @@ class FixedExtentMetrics extends FixedScrollMetrics {
int
?
itemIndex
,
})
{
return
FixedExtentMetrics
(
minScrollExtent:
minScrollExtent
??
this
.
minScrollExtent
,
maxScrollExtent:
maxScrollExtent
??
this
.
maxScrollExtent
,
pixels:
pixels
??
this
.
pixels
,
viewportDimension:
viewportDimension
??
this
.
viewportDimension
,
minScrollExtent:
minScrollExtent
??
(
hasContentDimensions
?
this
.
minScrollExtent
:
null
)
,
maxScrollExtent:
maxScrollExtent
??
(
hasContentDimensions
?
this
.
maxScrollExtent
:
null
)
,
pixels:
pixels
??
(
hasPixels
?
this
.
pixels
:
null
)
,
viewportDimension:
viewportDimension
??
(
hasViewportDimension
?
this
.
viewportDimension
:
null
)
,
axisDirection:
axisDirection
??
this
.
axisDirection
,
itemIndex:
itemIndex
??
this
.
itemIndex
,
);
...
...
@@ -412,10 +412,10 @@ class _FixedExtentScrollPosition extends ScrollPositionWithSingleContext impleme
int
?
itemIndex
,
})
{
return
FixedExtentMetrics
(
minScrollExtent:
minScrollExtent
??
this
.
minScrollExtent
,
maxScrollExtent:
maxScrollExtent
??
this
.
maxScrollExtent
,
pixels:
pixels
??
this
.
pixels
,
viewportDimension:
viewportDimension
??
this
.
viewportDimension
,
minScrollExtent:
minScrollExtent
??
(
hasContentDimensions
?
this
.
minScrollExtent
:
null
)
,
maxScrollExtent:
maxScrollExtent
??
(
hasContentDimensions
?
this
.
maxScrollExtent
:
null
)
,
pixels:
pixels
??
(
hasPixels
?
this
.
pixels
:
null
)
,
viewportDimension:
viewportDimension
??
(
hasViewportDimension
?
this
.
viewportDimension
:
null
)
,
axisDirection:
axisDirection
??
this
.
axisDirection
,
itemIndex:
itemIndex
??
this
.
itemIndex
,
);
...
...
packages/flutter/lib/src/widgets/nested_scroll_view.dart
View file @
e55b7ca0
...
...
@@ -706,10 +706,10 @@ class _InheritedNestedScrollView extends InheritedWidget {
class
_NestedScrollMetrics
extends
FixedScrollMetrics
{
_NestedScrollMetrics
({
required
double
minScrollExtent
,
required
double
maxScrollExtent
,
required
double
pixels
,
required
double
viewportDimension
,
required
double
?
minScrollExtent
,
required
double
?
maxScrollExtent
,
required
double
?
pixels
,
required
double
?
viewportDimension
,
required
AxisDirection
axisDirection
,
required
this
.
minRange
,
required
this
.
maxRange
,
...
...
@@ -734,10 +734,10 @@ class _NestedScrollMetrics extends FixedScrollMetrics {
double
?
correctionOffset
,
})
{
return
_NestedScrollMetrics
(
minScrollExtent:
minScrollExtent
??
this
.
minScrollExtent
,
maxScrollExtent:
maxScrollExtent
??
this
.
maxScrollExtent
,
pixels:
pixels
??
this
.
pixels
,
viewportDimension:
viewportDimension
??
this
.
viewportDimension
,
minScrollExtent:
minScrollExtent
??
(
hasContentDimensions
?
this
.
minScrollExtent
:
null
)
,
maxScrollExtent:
maxScrollExtent
??
(
hasContentDimensions
?
this
.
maxScrollExtent
:
null
)
,
pixels:
pixels
??
(
hasPixels
?
this
.
pixels
:
null
)
,
viewportDimension:
viewportDimension
??
(
hasViewportDimension
?
this
.
viewportDimension
:
null
)
,
axisDirection:
axisDirection
??
this
.
axisDirection
,
minRange:
minRange
??
this
.
minRange
,
maxRange:
maxRange
??
this
.
maxRange
,
...
...
packages/flutter/lib/src/widgets/page_view.dart
View file @
e55b7ca0
...
...
@@ -262,10 +262,10 @@ class PageController extends ScrollController {
class
PageMetrics
extends
FixedScrollMetrics
{
/// Creates an immutable snapshot of values associated with a [PageView].
PageMetrics
({
required
double
minScrollExtent
,
required
double
maxScrollExtent
,
required
double
pixels
,
required
double
viewportDimension
,
required
double
?
minScrollExtent
,
required
double
?
maxScrollExtent
,
required
double
?
pixels
,
required
double
?
viewportDimension
,
required
AxisDirection
axisDirection
,
required
this
.
viewportFraction
,
})
:
super
(
...
...
@@ -286,10 +286,10 @@ class PageMetrics extends FixedScrollMetrics {
double
?
viewportFraction
,
})
{
return
PageMetrics
(
minScrollExtent:
minScrollExtent
??
this
.
minScrollExtent
,
maxScrollExtent:
maxScrollExtent
??
this
.
maxScrollExtent
,
pixels:
pixels
??
this
.
pixels
,
viewportDimension:
viewportDimension
??
this
.
viewportDimension
,
minScrollExtent:
minScrollExtent
??
(
hasContentDimensions
?
this
.
minScrollExtent
:
null
)
,
maxScrollExtent:
maxScrollExtent
??
(
hasContentDimensions
?
this
.
maxScrollExtent
:
null
)
,
pixels:
pixels
??
(
hasPixels
?
this
.
pixels
:
null
)
,
viewportDimension:
viewportDimension
??
(
hasViewportDimension
?
this
.
viewportDimension
:
null
)
,
axisDirection:
axisDirection
??
this
.
axisDirection
,
viewportFraction:
viewportFraction
??
this
.
viewportFraction
,
);
...
...
@@ -441,10 +441,10 @@ class _PagePosition extends ScrollPositionWithSingleContext implements PageMetri
double
?
viewportFraction
,
})
{
return
PageMetrics
(
minScrollExtent:
minScrollExtent
??
this
.
minScrollExtent
,
maxScrollExtent:
maxScrollExtent
??
this
.
maxScrollExtent
,
pixels:
pixels
??
this
.
pixels
,
viewportDimension:
viewportDimension
??
this
.
viewportDimension
,
minScrollExtent:
minScrollExtent
??
(
hasContentDimensions
?
this
.
minScrollExtent
:
null
)
,
maxScrollExtent:
maxScrollExtent
??
(
hasContentDimensions
?
this
.
maxScrollExtent
:
null
)
,
pixels:
pixels
??
(
hasPixels
?
this
.
pixels
:
null
)
,
viewportDimension:
viewportDimension
??
(
hasViewportDimension
?
this
.
viewportDimension
:
null
)
,
axisDirection:
axisDirection
??
this
.
axisDirection
,
viewportFraction:
viewportFraction
??
this
.
viewportFraction
,
);
...
...
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