@@ -92,21 +92,25 @@ class MaterialPointArcTween extends Tween<Offset> {
9292 /// The center of the circular arc, null if [begin] and [end] are horizontally or
9393 /// vertically aligned, or if either is null.
9494 Offset ? get center {
95- if (begin == null || end == null )
95+ if (begin == null || end == null ) {
9696 return null ;
97- if (_dirty)
97+ }
98+ if (_dirty) {
9899 _initialize ();
100+ }
99101 return _center;
100102 }
101103 Offset ? _center;
102104
103105 /// The radius of the circular arc, null if [begin] and [end] are horizontally or
104106 /// vertically aligned, or if either is null.
105107 double ? get radius {
106- if (begin == null || end == null )
108+ if (begin == null || end == null ) {
107109 return null ;
108- if (_dirty)
110+ }
111+ if (_dirty) {
109112 _initialize ();
113+ }
110114 return _radius;
111115 }
112116 double ? _radius;
@@ -117,10 +121,12 @@ class MaterialPointArcTween extends Tween<Offset> {
117121 /// This will be null if [begin] and [end] are horizontally or vertically
118122 /// aligned, or if either is null.
119123 double ? get beginAngle {
120- if (begin == null || end == null )
124+ if (begin == null || end == null ) {
121125 return null ;
122- if (_dirty)
126+ }
127+ if (_dirty) {
123128 _initialize ();
129+ }
124130 return _beginAngle;
125131 }
126132 double ? _beginAngle;
@@ -131,10 +137,12 @@ class MaterialPointArcTween extends Tween<Offset> {
131137 /// This will be null if [begin] and [end] are horizontally or vertically
132138 /// aligned, or if either is null.
133139 double ? get endAngle {
134- if (begin == null || end == null )
140+ if (begin == null || end == null ) {
135141 return null ;
136- if (_dirty)
142+ }
143+ if (_dirty) {
137144 _initialize ();
145+ }
138146 return _beginAngle;
139147 }
140148 double ? _endAngle;
@@ -157,14 +165,18 @@ class MaterialPointArcTween extends Tween<Offset> {
157165
158166 @override
159167 Offset lerp (double t) {
160- if (_dirty)
168+ if (_dirty) {
161169 _initialize ();
162- if (t == 0.0 )
170+ }
171+ if (t == 0.0 ) {
163172 return begin! ;
164- if (t == 1.0 )
173+ }
174+ if (t == 1.0 ) {
165175 return end! ;
166- if (_beginAngle == null || _endAngle == null )
176+ }
177+ if (_beginAngle == null || _endAngle == null ) {
167178 return Offset .lerp (begin, end, t)! ;
179+ }
168180 final double angle = lerpDouble (_beginAngle, _endAngle, t)! ;
169181 final double x = math.cos (angle) * _radius! ;
170182 final double y = math.sin (angle) * _radius! ;
@@ -279,21 +291,25 @@ class MaterialRectArcTween extends RectTween {
279291 /// The path of the corresponding [begin] , [end] rectangle corners that lead
280292 /// the animation.
281293 MaterialPointArcTween ? get beginArc {
282- if (begin == null )
294+ if (begin == null ) {
283295 return null ;
284- if (_dirty)
296+ }
297+ if (_dirty) {
285298 _initialize ();
299+ }
286300 return _beginArc;
287301 }
288302 late MaterialPointArcTween _beginArc;
289303
290304 /// The path of the corresponding [begin] , [end] rectangle corners that trail
291305 /// the animation.
292306 MaterialPointArcTween ? get endArc {
293- if (end == null )
307+ if (end == null ) {
294308 return null ;
295- if (_dirty)
309+ }
310+ if (_dirty) {
296311 _initialize ();
312+ }
297313 return _endArc;
298314 }
299315 late MaterialPointArcTween _endArc;
@@ -316,12 +332,15 @@ class MaterialRectArcTween extends RectTween {
316332
317333 @override
318334 Rect lerp (double t) {
319- if (_dirty)
335+ if (_dirty) {
320336 _initialize ();
321- if (t == 0.0 )
337+ }
338+ if (t == 0.0 ) {
322339 return begin! ;
323- if (t == 1.0 )
340+ }
341+ if (t == 1.0 ) {
324342 return end! ;
343+ }
325344 return Rect .fromPoints (_beginArc.lerp (t), _endArc.lerp (t));
326345 }
327346
@@ -373,10 +392,12 @@ class MaterialRectCenterArcTween extends RectTween {
373392 /// If [begin] and [end] are non-null, returns a tween that interpolates along
374393 /// a circular arc between [begin] 's [Rect.center] and [end] 's [Rect.center] .
375394 MaterialPointArcTween ? get centerArc {
376- if (begin == null || end == null )
395+ if (begin == null || end == null ) {
377396 return null ;
378- if (_dirty)
397+ }
398+ if (_dirty) {
379399 _initialize ();
400+ }
380401 return _centerArc;
381402 }
382403 late MaterialPointArcTween _centerArc;
@@ -399,12 +420,15 @@ class MaterialRectCenterArcTween extends RectTween {
399420
400421 @override
401422 Rect lerp (double t) {
402- if (_dirty)
423+ if (_dirty) {
403424 _initialize ();
404- if (t == 0.0 )
425+ }
426+ if (t == 0.0 ) {
405427 return begin! ;
406- if (t == 1.0 )
428+ }
429+ if (t == 1.0 ) {
407430 return end! ;
431+ }
408432 final Offset center = _centerArc.lerp (t);
409433 final double width = lerpDouble (begin! .width, end! .width, t)! ;
410434 final double height = lerpDouble (begin! .height, end! .height, t)! ;
0 commit comments