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
7982a3a2
Unverified
Commit
7982a3a2
authored
May 02, 2018
by
xster
Committed by
GitHub
May 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New gallery performance improvements (#17167)
parent
e77cfcf2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
55 deletions
+64
-55
home.dart
examples/flutter_gallery/lib/gallery/home.dart
+64
-55
No files found.
examples/flutter_gallery/lib/gallery/home.dart
View file @
7982a3a2
...
...
@@ -52,7 +52,10 @@ class _CategoryItem extends StatelessWidget {
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
bool
isDark
=
theme
.
brightness
==
Brightness
.
dark
;
return
new
RawMaterialButton
(
// This repaint boundary prevents the entire _CategoriesPage from being
// repainted when the button's ink splash animates.
return
new
RepaintBoundary
(
child:
new
RawMaterialButton
(
padding:
EdgeInsets
.
zero
,
splashColor:
theme
.
primaryColor
.
withOpacity
(
0.12
),
highlightColor:
Colors
.
transparent
,
...
...
@@ -84,6 +87,7 @@ class _CategoryItem extends StatelessWidget {
),
],
),
),
);
}
}
...
...
@@ -112,7 +116,11 @@ class _CategoriesPage extends StatelessWidget {
final
double
rowHeight
=
columnWidth
*
aspectRatio
;
final
int
rowCount
=
(
categories
.
length
+
columnCount
-
1
)
~/
columnCount
;
return
new
Column
(
// This repaint boundary prevents the inner contents of the front layer
// from repainting when the backdrop toggle triggers a repaint on the
// LayoutBuilder.
return
new
RepaintBoundary
(
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
...
...
@@ -139,6 +147,7 @@ class _CategoriesPage extends StatelessWidget {
}),
);
}),
),
);
},
),
...
...
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