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 '../fn.dart'; | 5 import '../fn.dart'; |
6 import '../theme/shadows.dart'; | 6 import '../theme/shadows.dart'; |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:math'; | |
9 import 'dart:sky' as sky; | 8 import 'dart:sky' as sky; |
10 import 'ink_splash.dart'; | 9 import 'ink_splash.dart'; |
11 | 10 |
12 class Material extends Component { | 11 class Material extends Component { |
13 static const _splashesKey = const Object(); | |
14 | |
15 static final Style _splashesStyle = new Style(''' | 12 static final Style _splashesStyle = new Style(''' |
16 transform: translateX(0); | 13 transform: translateX(0); |
17 position: absolute; | 14 position: absolute; |
18 top: 0; | 15 top: 0; |
19 left: 0; | 16 left: 0; |
20 right: 0; | 17 right: 0; |
21 bottom: 0''' | 18 bottom: 0''' |
22 ); | 19 ); |
23 | 20 |
24 static final List<Style> shadowStyle = [ | 21 static final List<Style> shadowStyle = [ |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 108 } |
112 | 109 |
113 setState(() { | 110 setState(() { |
114 _splashes.remove(splash); | 111 _splashes.remove(splash); |
115 if (_splashes.length == 0) { | 112 if (_splashes.length == 0) { |
116 _splashes = null; | 113 _splashes = null; |
117 } | 114 } |
118 }); | 115 }); |
119 } | 116 } |
120 } | 117 } |
OLD | NEW |