OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
3 // | 3 // |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
7 // | 7 // |
8 | 8 |
9 part of charted.charts; | 9 part of charted.charts; |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 assert(values != null && values.isNotEmpty); | 50 assert(values != null && values.isNotEmpty); |
51 | 51 |
52 _disposer.dispose(); | 52 _disposer.dispose(); |
53 _series = values; | 53 _series = values; |
54 notifyChange(const ChartConfigChangeRecord()); | 54 notifyChange(const ChartConfigChangeRecord()); |
55 | 55 |
56 // Monitor each series for changes on them | 56 // Monitor each series for changes on them |
57 values.forEach((item) { | 57 values.forEach((item) { |
58 if (item is Observable) { | 58 if (item is Observable) { |
59 _disposer.add( | 59 _disposer.add( |
60 item.changes | 60 (item as Observable) |
| 61 .changes |
61 .listen((_) => notifyChange(const ChartConfigChangeRecord())), | 62 .listen((_) => notifyChange(const ChartConfigChangeRecord())), |
62 item); | 63 item); |
63 } | 64 } |
64 }); | 65 }); |
65 | 66 |
66 // Monitor series for changes. When the list changes, update | 67 // Monitor series for changes. When the list changes, update |
67 // subscriptions to ChartSeries changes. | 68 // subscriptions to ChartSeries changes. |
68 if (_series is ObservableList) { | 69 if (_series is ObservableList) { |
69 var observable = _series as ObservableList; | 70 var observable = _series as ObservableList; |
70 _disposer.add(observable.listChanges.listen((records) { | 71 _disposer.add(observable.listChanges.listen((records) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 set isRTL(bool value) { | 130 set isRTL(bool value) { |
130 if (_isRTL != value && value != null) { | 131 if (_isRTL != value && value != null) { |
131 _isRTL = value; | 132 _isRTL = value; |
132 notifyChange(const ChartConfigChangeRecord()); | 133 notifyChange(const ChartConfigChangeRecord()); |
133 } | 134 } |
134 } | 135 } |
135 | 136 |
136 @override | 137 @override |
137 bool get isRTL => _isRTL; | 138 bool get isRTL => _isRTL; |
138 } | 139 } |
OLD | NEW |