OLD | NEW |
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/animated_value.dart'; | 5 import '../animation/animated_value.dart'; |
6 import '../animation/curves.dart'; | 6 import '../animation/curves.dart'; |
7 import '../fn2.dart'; | 7 import '../fn2.dart'; |
8 import '../theme/view_configuration.dart' as config; | 8 import '../theme/view_configuration.dart' as config; |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 import 'dart:math' as math; | 10 import 'dart:math' as math; |
11 import '../layout2.dart'; | |
12 | 11 |
13 const double _kSplashConfirmedDuration = 350.0; | 12 const double _kSplashConfirmedDuration = 350.0; |
14 const double _kSplashUnconfirmedDuration = config.kDefaultLongPressTimeout; | 13 const double _kSplashUnconfirmedDuration = config.kDefaultLongPressTimeout; |
15 const double _kSplashAbortDuration = 100.0; | 14 const double _kSplashAbortDuration = 100.0; |
16 const double _kSplashInitialDelay = 0.0; // we could delay initially in case the
user scrolls | 15 const double _kSplashInitialDelay = 0.0; // we could delay initially in case the
user scrolls |
17 | 16 |
18 double _getSplashTargetSize(Rect rect, double x, double y) { | 17 double _getSplashTargetSize(Rect rect, double x, double y) { |
19 return 2.0 * math.max(math.max(x - rect.x, rect.x + rect.width - x), | 18 return 2.0 * math.max(math.max(x - rect.x, rect.x + rect.width - x), |
20 math.max(y - rect.y, rect.y + rect.height - y)); | 19 math.max(y - rect.y, rect.y + rect.height - y)); |
21 } | 20 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 style: _clipperStyle, | 131 style: _clipperStyle, |
133 children: [ | 132 children: [ |
134 new Container( | 133 new Container( |
135 inlineStyle: _inlineStyle, | 134 inlineStyle: _inlineStyle, |
136 style: _splashStyle | 135 style: _splashStyle |
137 ) | 136 ) |
138 ] | 137 ] |
139 ); | 138 ); |
140 } | 139 } |
141 } | 140 } |
OLD | NEW |