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

Side by Side Diff: sky/framework/components/drawer.dart

Issue 1017463002: Fix some checked mode errors in drawer.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « sky/framework/animation/generators.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../animation/animation.dart'; 5 import '../animation/animation.dart';
6 import '../animation/curves.dart'; 6 import '../animation/curves.dart';
7 import '../fn.dart'; 7 import '../fn.dart';
8 import '../theme/colors.dart'; 8 import '../theme/colors.dart';
9 import '../theme/shadows.dart'; 9 import '../theme/shadows.dart';
10 import 'dart:async'; 10 import 'dart:async';
11 import 'dart:math' as math; 11 import 'dart:math' as math;
12 import 'dart:sky' as sky; 12 import 'dart:sky' as sky;
13 import 'material.dart'; 13 import 'material.dart';
14 14
15 const double _kWidth = 304.0; 15 const double _kWidth = 304.0;
16 const double _kMinFlingVelocity = 0.4; 16 const double _kMinFlingVelocity = 0.4;
17 const double _kBaseSettleDurationMS = 246.0; 17 const double _kBaseSettleDurationMS = 246.0;
18 const double _kMaxSettleDurationMS = 600.0; 18 const double _kMaxSettleDurationMS = 600.0;
19 const Cubic _kAnimationCurve = parabolicRise; 19 const Curve _kAnimationCurve = parabolicRise;
20 20
21 class DrawerAnimation extends Animation { 21 class DrawerAnimation extends Animation {
22 Stream<double> get onPositionChanged => onValueChanged; 22 Stream<double> get onPositionChanged => onValueChanged;
23 23
24 bool get _isMostlyClosed => value <= -_kWidth / 2; 24 bool get _isMostlyClosed => value <= -_kWidth / 2;
25 25
26 DrawerAnimation() { 26 DrawerAnimation() {
27 value = -_kWidth; 27 value = -_kWidth;
28 } 28 }
29 29
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 level: level 161 level: level
162 ); 162 );
163 163
164 return new Container( 164 return new Container(
165 style: _style, 165 style: _style,
166 inlineStyle: inlineStyle, 166 inlineStyle: inlineStyle,
167 children: [ mask, content ] 167 children: [ mask, content ]
168 ); 168 );
169 } 169 }
170 } 170 }
OLDNEW
« no previous file with comments | « sky/framework/animation/generators.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698