@@ -33,15 +33,13 @@ abstract class StreamColorSwatches {
33
33
/// This computation is cached on the instance
34
34
/// in order to save work building [t] 's animation frame when there are
35
35
/// multiple UI elements using the same [subscription.color] .
36
- StreamColorSwatches lerp (StreamColorSwatches ? other, double t) {
36
+ StreamColorSwatches lerp (StreamColorSwatches other, double t) {
37
37
// This short-circuit helps when [a] and [b]
38
38
// are both [StreamColorSwatches.light]
39
39
// or both [StreamColorSwatches.dark].
40
40
// Empirically, [lerp] is called even when the theme hasn't changed,
41
41
// so this is an important optimization.
42
- if (identical (this , other)) {
43
- return this ;
44
- }
42
+ if (identical (this , other)) return this ;
45
43
46
44
return _StreamColorSwatchesLerped (this , other, t);
47
45
}
@@ -65,12 +63,12 @@ class _StreamColorSwatchesLerped extends StreamColorSwatches {
65
63
_StreamColorSwatchesLerped (this .a, this .b, this .t);
66
64
67
65
final StreamColorSwatches a;
68
- final StreamColorSwatches ? b;
66
+ final StreamColorSwatches b;
69
67
final double t;
70
68
71
69
@override
72
70
StreamColorSwatch _computeForBaseColor (int base ) =>
73
- StreamColorSwatch .lerp (a.forBaseColor (base ), b? .forBaseColor (base ), t)! ;
71
+ StreamColorSwatch .lerp (a.forBaseColor (base ), b.forBaseColor (base ), t)! ;
74
72
}
75
73
76
74
0 commit comments