| Index: sky/sdk/lib/widgets/toggleable.dart
|
| diff --git a/sky/sdk/lib/widgets/toggleable.dart b/sky/sdk/lib/widgets/toggleable.dart
|
| index 5d5a945e2d7e9552972569fa111e210c97f472e9..dd06917ae5595a0bc4b488d1c1281270d84c5ab1 100644
|
| --- a/sky/sdk/lib/widgets/toggleable.dart
|
| +++ b/sky/sdk/lib/widgets/toggleable.dart
|
| @@ -19,14 +19,7 @@ abstract class Toggleable extends AnimatedComponent {
|
| String key,
|
| this.value,
|
| this.onChanged
|
| - }) : super(key: key) {
|
| - _position = new AnimatedType<double>(0.0, end: 1.0);
|
| - _performance = new AnimationPerformance()
|
| - ..variable = position
|
| - ..duration = _kCheckDuration
|
| - ..progress = value ? 1.0 : 0.0;
|
| - watchPerformance(performance);
|
| - }
|
| + }) : super(key: key);
|
|
|
| bool value;
|
| ValueChanged onChanged;
|
| @@ -37,6 +30,15 @@ abstract class Toggleable extends AnimatedComponent {
|
| AnimationPerformance _performance;
|
| AnimationPerformance get performance => _performance;
|
|
|
| + void initState() {
|
| + _position = new AnimatedType<double>(0.0, end: 1.0);
|
| + _performance = new AnimationPerformance()
|
| + ..variable = position
|
| + ..duration = _kCheckDuration
|
| + ..progress = value ? 1.0 : 0.0;
|
| + watch(performance);
|
| + }
|
| +
|
| void syncFields(Toggleable source) {
|
| onChanged = source.onChanged;
|
| if (value != source.value) {
|
|
|