From c621ec82a05361836b71f0245589f3f81a513d07 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 28 Sep 2016 10:30:50 -0700 Subject: [PATCH] Rename Interval.start to begin (#6115) For consistency with Tween. Fixes #5169 --- packages/flutter/lib/src/animation/curves.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/flutter/lib/src/animation/curves.dart b/packages/flutter/lib/src/animation/curves.dart index 0ce3f832c6..bec6201d40 100644 --- a/packages/flutter/lib/src/animation/curves.dart +++ b/packages/flutter/lib/src/animation/curves.dart @@ -77,10 +77,10 @@ class Interval extends Curve { /// Creates an interval curve. /// /// The [start] and [end] arguments must not be null. - const Interval(this.start, this.end, { this.curve: Curves.linear }); + const Interval(this.begin, this.end, { this.curve: Curves.linear }); /// The smallest value for which this interval is 0.0. - final double start; + final double begin; /// The smallest value for which this interval is 1.0. final double end; @@ -90,14 +90,14 @@ class Interval extends Curve { @override double transform(double t) { - assert(start >= 0.0); - assert(start <= 1.0); + assert(begin >= 0.0); + assert(begin <= 1.0); assert(end >= 0.0); assert(end <= 1.0); - assert(end >= start); + assert(end >= begin); if (t == 0.0 || t == 1.0) return t; - t = ((t - start) / (end - start)).clamp(0.0, 1.0); + t = ((t - begin) / (end - begin)).clamp(0.0, 1.0); if (t == 0.0 || t == 1.0) return t; return curve.transform(t); @@ -106,8 +106,8 @@ class Interval extends Curve { @override String toString() { if (curve is! Linear) - return '$runtimeType($start\u22EF$end)\u27A9$curve'; - return '$runtimeType($start\u22EF$end)'; + return '$runtimeType($begin\u22EF$end)\u27A9$curve'; + return '$runtimeType($begin\u22EF$end)'; } }