OLD | NEW |
1 part of widgets; | 1 part of widgets; |
2 | 2 |
3 abstract class MaterialComponent extends Component { | 3 abstract class MaterialComponent extends Component { |
4 | 4 |
5 static const _splashesKey = const Object(); | 5 static const _splashesKey = const Object(); |
6 | 6 |
7 static Style _style = new Style(''' | 7 static Style _style = new Style(''' |
8 transform: translateX(0); | 8 transform: translateX(0); |
9 position: absolute; | 9 position: absolute; |
10 top: 0; | 10 top: 0; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return; | 54 return; |
55 } | 55 } |
56 | 56 |
57 setState(() { | 57 setState(() { |
58 var splashes = _splashes; | 58 var splashes = _splashes; |
59 _splashes = null; | 59 _splashes = null; |
60 splashes.forEach((s) { s.cancel(); }); | 60 splashes.forEach((s) { s.cancel(); }); |
61 }); | 61 }); |
62 } | 62 } |
63 | 63 |
64 void willUnmount() { | 64 void didUnmount() { |
65 _cancelSplashes(null); | 65 _cancelSplashes(null); |
66 } | 66 } |
67 | 67 |
68 void _splashDone(SplashAnimation splash) { | 68 void _splashDone(SplashAnimation splash) { |
69 if (_splashes == null) { | 69 if (_splashes == null) { |
70 return; | 70 return; |
71 } | 71 } |
72 | 72 |
73 setState(() { | 73 setState(() { |
74 _splashes.remove(splash); | 74 _splashes.remove(splash); |
75 if (_splashes.length == 0) { | 75 if (_splashes.length == 0) { |
76 _splashes = null; | 76 _splashes = null; |
77 } | 77 } |
78 }); | 78 }); |
79 } | 79 } |
80 } | 80 } |
OLD | NEW |