| 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'; |
| 11 | 11 |
| 12 class InkWell extends Component implements ScrollClient { | 12 class InkWell extends Component implements ScrollClient { |
| 13 |
| 14 InkWell({ Object key, this.children }) : super(key: key); |
| 15 |
| 13 // static final Style _containmentStyleHack = new Style(''' | 16 // static final Style _containmentStyleHack = new Style(''' |
| 14 // align-items: center; | 17 // align-items: center; |
| 15 // transform: translateX(0);'''); | 18 // transform: translateX(0);'''); |
| 16 | 19 |
| 17 // LinkedHashSet<SplashController> _splashes; | 20 // LinkedHashSet<SplashController> _splashes; |
| 18 | 21 |
| 19 List<UINode> children; | 22 List<UINode> children; |
| 20 | 23 |
| 21 // InkWell({ Object key, this.inlineStyle, this.children }) | 24 // InkWell({ Object key, this.inlineStyle, this.children }) |
| 22 // : super(key: key) { | 25 // : super(key: key) { |
| 23 // onDidUnmount(() { | 26 // onDidUnmount(() { |
| 24 // _cancelSplashes(null); | 27 // _cancelSplashes(null); |
| 25 // }); | 28 // }); |
| 26 // } | 29 // } |
| 27 | 30 |
| 28 InkWell({ Object key, this.children }) : super(key: key); | |
| 29 | |
| 30 UINode build() { | 31 UINode build() { |
| 31 return new FlexContainer( | 32 return new FlexContainer( |
| 32 direction: FlexDirection.horizontal, | 33 direction: FlexDirection.horizontal, |
| 33 justifyContent: FlexJustifyContent.center, | 34 justifyContent: FlexJustifyContent.center, |
| 34 children: children); | 35 children: children); |
| 35 // List<UINode> childrenIncludingSplashes = []; | 36 // List<UINode> childrenIncludingSplashes = []; |
| 36 | 37 |
| 37 // if (_splashes != null) { | 38 // if (_splashes != null) { |
| 38 // childrenIncludingSplashes.addAll( | 39 // childrenIncludingSplashes.addAll( |
| 39 // _splashes.map((s) => new InkSplash(s.onStyleChanged))); | 40 // _splashes.map((s) => new InkSplash(s.onStyleChanged))); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 115 |
| 115 // void _splashDone(SplashController splash) { | 116 // void _splashDone(SplashController splash) { |
| 116 // if (_splashes == null) | 117 // if (_splashes == null) |
| 117 // return; | 118 // return; |
| 118 // setState(() { | 119 // setState(() { |
| 119 // _splashes.remove(splash); | 120 // _splashes.remove(splash); |
| 120 // if (_splashes.length == 0) | 121 // if (_splashes.length == 0) |
| 121 // _splashes = null; | 122 // _splashes = null; |
| 122 // }); | 123 // }); |
| 123 // } | 124 // } |
| 125 |
| 124 } | 126 } |
| OLD | NEW |