Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: sky/sdk/lib/widgets/variable_height_scrollable.dart

Issue 1234863004: Remove redundant setState() calls around scroll behaviour updates. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/widgets/scrollable_viewport.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/variable_height_scrollable.dart
diff --git a/sky/sdk/lib/widgets/variable_height_scrollable.dart b/sky/sdk/lib/widgets/variable_height_scrollable.dart
index eee82dda1ef4c1c086693f73da46d807a9b638b3..ed74d11ca23f2cd84a792586b27d42124c5e77f7 100644
--- a/sky/sdk/lib/widgets/variable_height_scrollable.dart
+++ b/sky/sdk/lib/widgets/variable_height_scrollable.dart
@@ -30,16 +30,15 @@ class VariableHeightScrollable extends Scrollable {
OverscrollBehavior get scrollBehavior => super.scrollBehavior;
void _handleSizeChanged(Size newSize) {
- setState(() {
- scrollBehavior.containerSize = newSize.height;
- });
+ scrollBehavior.containerSize = newSize.height;
hansmuller 2015/07/13 19:03:53 If the viewport's size changes, don't you want to
}
void _handleLayoutChanged(
- int firstVisibleChildIndex,
- int visibleChildCount,
- UnmodifiableListView<double> childOffsets,
- bool didReachLastChild) {
+ int firstVisibleChildIndex,
+ int visibleChildCount,
+ UnmodifiableListView<double> childOffsets,
+ bool didReachLastChild
+ ) {
assert(childOffsets.length > 0);
scrollBehavior.contentsSize = didReachLastChild ? childOffsets.last : double.INFINITY;
if (didReachLastChild && scrollOffset > scrollBehavior.maxScrollOffset)
« no previous file with comments | « sky/sdk/lib/widgets/scrollable_viewport.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698