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
0e70a97e
Unverified
Commit
0e70a97e
authored
Nov 02, 2022
by
Kate Lovett
Committed by
GitHub
Nov 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Animated[List, Grid, SliverList, SliverGrid] to share common code (#113793)
parent
1cfdac4b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
672 additions
and
983 deletions
+672
-983
sliver_grid.dart
packages/flutter/lib/src/rendering/sliver_grid.dart
+3
-3
animated_list.dart
packages/flutter/lib/src/widgets/animated_list.dart
+0
-700
animated_scroll_view.dart
packages/flutter/lib/src/widgets/animated_scroll_view.dart
+668
-278
widgets.dart
packages/flutter/lib/widgets.dart
+1
-2
No files found.
packages/flutter/lib/src/rendering/sliver_grid.dart
View file @
0e70a97e
...
...
@@ -462,9 +462,9 @@ class SliverGridDelegateWithMaxCrossAxisExtent extends SliverGridDelegate {
SliverGridLayout
getLayout
(
SliverConstraints
constraints
)
{
assert
(
_debugAssertIsValid
(
constraints
.
crossAxisExtent
));
int
crossAxisCount
=
(
constraints
.
crossAxisExtent
/
(
maxCrossAxisExtent
+
crossAxisSpacing
)).
ceil
();
//
TODO(gspencergoog): Figure out why we need this in release mode (and only
//
in release mode). https://github.com/flutter/flutter/issues/113109
crossAxisCount
=
crossAxisCount
<
1
?
1
:
crossAxisCount
;
//
Ensure a minimum count of 1, can be zero and result in an infinite extent
//
below when the window size is 0.
crossAxisCount
=
math
.
max
(
1
,
crossAxisCount
)
;
final
double
usableCrossAxisExtent
=
math
.
max
(
0.0
,
constraints
.
crossAxisExtent
-
crossAxisSpacing
*
(
crossAxisCount
-
1
),
...
...
packages/flutter/lib/src/widgets/animated_list.dart
deleted
100644 → 0
View file @
1cfdac4b
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/animated_
grid
.dart
→
packages/flutter/lib/src/widgets/animated_
scroll_view
.dart
View file @
0e70a97e
This diff is collapsed.
Click to expand it.
packages/flutter/lib/widgets.dart
View file @
0e70a97e
...
...
@@ -19,8 +19,7 @@ export 'foundation.dart' show UniqueKey;
export
'rendering.dart'
show
TextSelectionHandleType
;
export
'src/widgets/actions.dart'
;
export
'src/widgets/animated_cross_fade.dart'
;
export
'src/widgets/animated_grid.dart'
;
export
'src/widgets/animated_list.dart'
;
export
'src/widgets/animated_scroll_view.dart'
;
export
'src/widgets/animated_size.dart'
;
export
'src/widgets/animated_switcher.dart'
;
export
'src/widgets/annotated_region.dart'
;
...
...
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