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

Side by Side Diff: sky/sdk/lib/framework/widgets/fixed_height_scrollable.dart

Issue 1179713004: Material and RaisedButton. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:math' as math; 5 import 'dart:math' as math;
6 6
7 import 'package:vector_math/vector_math.dart'; 7 import 'package:vector_math/vector_math.dart';
8 8
9 import '../animation/scroll_behavior.dart'; 9 import '../animation/scroll_behavior.dart';
10 import 'scrollable.dart'; 10 import 'scrollable.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 double drawStart = scrollOffset + alignmentDelta; 63 double drawStart = scrollOffset + alignmentDelta;
64 itemShowIndex = math.max(0, (drawStart / itemHeight).floor()); 64 itemShowIndex = math.max(0, (drawStart / itemHeight).floor());
65 65
66 transform.translate(0.0, alignmentDelta); 66 transform.translate(0.0, alignmentDelta);
67 } 67 }
68 } 68 }
69 69
70 return new SizeObserver( 70 return new SizeObserver(
71 callback: _handleSizeChanged, 71 callback: _handleSizeChanged,
72 child: new ClipRect( 72 child: new ClipRect(
73 child: new DecoratedBox( 73 child: new Transform(
74 decoration: const BoxDecoration( 74 transform: transform,
75 backgroundColor: const Color(0xFFFFFFFF) 75 child: new Block(buildItems(itemShowIndex, itemShowCount))
76 ),
77 child: new Transform(
78 transform: transform,
79 child: new Block(buildItems(itemShowIndex, itemShowCount))
80 )
81 ) 76 )
82 ) 77 )
83 ); 78 );
84 } 79 }
85 80
86 List<UINode> buildItems(int start, int count); 81 List<UINode> buildItems(int start, int count);
87 82
88 } 83 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/widgets/drawer.dart ('k') | sky/sdk/lib/framework/widgets/floating_action_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698