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 '../fn2.dart'; | 5 import '../fn2.dart'; |
6 import '../rendering/flex.dart'; | 6 import '../rendering/flex.dart'; |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:sky' as sky; | 8 import 'dart:sky' as sky; |
9 // import 'ink_splash.dart'; | 9 // import 'ink_splash.dart'; |
10 import 'scrollable.dart'; | 10 import 'scrollable.dart'; |
(...skipping 10 matching lines...) Expand all Loading... |
21 // InkWell({ Object key, this.inlineStyle, this.children }) | 21 // InkWell({ Object key, this.inlineStyle, this.children }) |
22 // : super(key: key) { | 22 // : super(key: key) { |
23 // onDidUnmount(() { | 23 // onDidUnmount(() { |
24 // _cancelSplashes(null); | 24 // _cancelSplashes(null); |
25 // }); | 25 // }); |
26 // } | 26 // } |
27 | 27 |
28 InkWell({ Object key, this.children }) : super(key: key); | 28 InkWell({ Object key, this.children }) : super(key: key); |
29 | 29 |
30 UINode build() { | 30 UINode build() { |
31 return new FlexContainer(direction: FlexDirection.Horizontal, children: chil
dren); | 31 return new FlexContainer(direction: FlexDirection.horizontal, children: chil
dren); |
32 // List<UINode> childrenIncludingSplashes = []; | 32 // List<UINode> childrenIncludingSplashes = []; |
33 | 33 |
34 // if (_splashes != null) { | 34 // if (_splashes != null) { |
35 // childrenIncludingSplashes.addAll( | 35 // childrenIncludingSplashes.addAll( |
36 // _splashes.map((s) => new InkSplash(s.onStyleChanged))); | 36 // _splashes.map((s) => new InkSplash(s.onStyleChanged))); |
37 // } | 37 // } |
38 | 38 |
39 // if (children != null) | 39 // if (children != null) |
40 // childrenIncludingSplashes.addAll(children); | 40 // childrenIncludingSplashes.addAll(children); |
41 | 41 |
42 // return new EventListenerNode( | 42 // return new EventListenerNode( |
43 // new FlexContainer( | 43 // new FlexContainer( |
44 // direction: FlexDirection.Row, | 44 // direction: FlexDirection.horizontal, |
45 // style: _containmentStyleHack, | 45 // style: _containmentStyleHack, |
46 // inlineStyle: inlineStyle, | 46 // inlineStyle: inlineStyle, |
47 // children: childrenIncludingSplashes), | 47 // children: childrenIncludingSplashes), |
48 // onGestureTapDown: _startSplash, | 48 // onGestureTapDown: _startSplash, |
49 // onGestureTap: _confirmSplash | 49 // onGestureTap: _confirmSplash |
50 // ); | 50 // ); |
51 } | 51 } |
52 | 52 |
53 // void _startSplash(sky.GestureEvent event) { | 53 // void _startSplash(sky.GestureEvent event) { |
54 // setState(() { | 54 // setState(() { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // void _splashDone(SplashController splash) { | 112 // void _splashDone(SplashController splash) { |
113 // if (_splashes == null) | 113 // if (_splashes == null) |
114 // return; | 114 // return; |
115 // setState(() { | 115 // setState(() { |
116 // _splashes.remove(splash); | 116 // _splashes.remove(splash); |
117 // if (_splashes.length == 0) | 117 // if (_splashes.length == 0) |
118 // _splashes = null; | 118 // _splashes = null; |
119 // }); | 119 // }); |
120 // } | 120 // } |
121 } | 121 } |
OLD | NEW |