Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: sky/sdk/lib/widgets/toggleable.dart

Issue 1230273004: Make performance and position private since they don’t sync (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/toggleable.dart
diff --git a/sky/sdk/lib/widgets/toggleable.dart b/sky/sdk/lib/widgets/toggleable.dart
index 10162678d057521e2dc9663595b345f298e647fb..f6187415d3ed03c1ff00dffccfc1ebeff5e28675 100644
--- a/sky/sdk/lib/widgets/toggleable.dart
+++ b/sky/sdk/lib/widgets/toggleable.dart
@@ -20,8 +20,8 @@ abstract class Toggleable extends AnimatedComponent {
this.value,
this.onChanged
}) : super(key: key) {
- position = new AnimatedType<double>(0.0, end: 1.0);
- performance = new AnimationPerformance()
+ _position = new AnimatedType<double>(0.0, end: 1.0);
+ _performance = new AnimationPerformance()
..variable = position
..duration = _kCheckDuration
..progress = value ? 1.0 : 0.0;
@@ -31,8 +31,11 @@ abstract class Toggleable extends AnimatedComponent {
bool value;
ValueChanged onChanged;
- AnimatedType<double> position;
- AnimationPerformance performance;
+ AnimatedType<double> _position;
+ AnimatedType<double> get position => _position;
+
+ AnimationPerformance _performance;
+ AnimationPerformance get performance => _performance;
void syncFields(Toggleable source) {
onChanged = source.onChanged;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698