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

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

Issue 1232403004: Trivial code style changes in animation code. (Closed) Base URL: https://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
Index: sky/sdk/lib/widgets/animation_builder.dart
diff --git a/sky/sdk/lib/widgets/animation_builder.dart b/sky/sdk/lib/widgets/animation_builder.dart
index f91f8f5b2d4eace9cd3f6a8bc26fb4462027c89b..15cff58ad11b4bc3bb52842347b9e67f58844dd1 100644
--- a/sky/sdk/lib/widgets/animation_builder.dart
+++ b/sky/sdk/lib/widgets/animation_builder.dart
@@ -15,6 +15,9 @@ import 'package:sky/widgets/basic.dart';
// animated properties. Use syncFields to update the Container's properties,
// which will optionally animate them using an AnimationPerformance.
class AnimationBuilder {
+
+ AnimationBuilder();
+
AnimatedType<double> opacity;
AnimatedType<Point> position;
AnimatedType<double> shadow;
@@ -27,10 +30,8 @@ class AnimationBuilder {
Map<AnimatedVariable, AnimationPerformance> _variableToPerformance =
new Map<AnimatedVariable, AnimationPerformance>();
- AnimationBuilder();
-
AnimationPerformance createPerformance(List<AnimatedType> variables,
- {Duration duration}) {
+ { Duration duration }) {
AnimationPerformance performance = new AnimationPerformance()
..duration = duration
..variable = new AnimatedList(variables);
@@ -65,10 +66,12 @@ class AnimationBuilder {
return current;
}
- void updateFields({ AnimatedType<double> shadow,
- AnimatedColor backgroundColor,
- double borderRadius,
- Shape shape }) {
+ void updateFields({
+ AnimatedType<double> shadow,
+ AnimatedColor backgroundColor,
+ double borderRadius,
+ Shape shape
+ }) {
_updateField(this.shadow, shadow);
_updateField(this.backgroundColor, backgroundColor);
this.borderRadius = borderRadius;
@@ -77,7 +80,7 @@ class AnimationBuilder {
void _updateField(AnimatedType variable, AnimatedType sourceVariable) {
if (variable == null)
- return; // TODO(mpcomplete): Should we handle transition from null?
+ return; // TODO(mpcomplete): Should we handle transition from null?
Matt Perry 2015/07/13 17:32:55 google C++ style is to have 2 spaces before in-lin
AnimationPerformance performance = _variableToPerformance[variable];
if (performance == null) {
@@ -99,8 +102,8 @@ class AnimationBuilder {
}
class AnimatedColor extends AnimatedType<Color> {
- AnimatedColor(Color begin, {Color end, Curve curve: linear})
- : super(begin, end: end, curve: curve);
+ AnimatedColor(Color begin, { Color end, Curve curve: linear })
+ : super(begin, end: end, curve: curve);
void setFraction(double t) {
value = lerpColor(begin, end, t);

Powered by Google App Engine
This is Rietveld 408576698