1
1
import 'package:amiibo_network/resources/material3_schemes.dart' ;
2
+ import 'package:amiibo_network/utils/color_utils.dart' ;
2
3
import 'package:flutter/material.dart' ;
3
4
import 'package:material_color_utilities/material_color_utilities.dart' ;
4
5
@@ -8,7 +9,7 @@ ColorScheme blendScheme(
8
9
[double amount = 0.3 ]
9
10
) {
10
11
Color _harmonize (Color original, Color destiny) => Color (
11
- Blend .hctHue (original.value , destiny.value , amount),
12
+ Blend .hctHue (original.colorValue , destiny.colorValue , amount),
12
13
);
13
14
return ColorScheme (
14
15
brightness: originalScheme.brightness,
@@ -81,7 +82,7 @@ class TonalColor extends ColorSwatch<int> {
81
82
///
82
83
/// The `primary` argument should be the 32 bit ARGB value of one of the
83
84
/// values in the swatch, as would be passed to the [Color.new] constructor
84
- /// for that same color, and as is exposed by [value ] . (This is distinct from
85
+ /// for that same color, and as is exposed by [colorValue ] . (This is distinct from
85
86
/// the specific index of the color in the swatch.)
86
87
const TonalColor (super .primary, super .swatch);
87
88
@@ -130,22 +131,22 @@ class TonalColor extends ColorSwatch<int> {
130
131
TonalColor blend (Color sourceColor) {
131
132
final blend = Blend .harmonize;
132
133
return TonalColor (
133
- blend (value , sourceColor.value ),
134
+ blend (colorValue , sourceColor.colorValue ),
134
135
< int , Color > {
135
- 0 : Color (blend (this [0 ]! .value , sourceColor.value )),
136
- 10 : Color (blend (this [10 ]! .value , sourceColor.value )),
137
- 20 : Color (blend (this [20 ]! .value , sourceColor.value )),
138
- 30 : Color (blend (this [30 ]! .value , sourceColor.value )),
139
- 40 : Color (blend (this [40 ]! .value , sourceColor.value )),
140
- 50 : Color (blend (this [50 ]! .value , sourceColor.value )),
141
- 60 : Color (blend (this [60 ]! .value , sourceColor.value )),
142
- 70 : Color (blend (this [70 ]! .value , sourceColor.value )),
143
- 80 : Color (blend (this [80 ]! .value , sourceColor.value )),
144
- 90 : Color (blend (this [90 ]! .value , sourceColor.value )),
145
- 95 : Color (blend (this [95 ]! .value , sourceColor.value )),
146
- 98 : Color (blend (this [98 ]! .value , sourceColor.value )),
147
- 99 : Color (blend (this [99 ]! .value , sourceColor.value )),
148
- 100 : Color (blend (this [100 ]! .value , sourceColor.value )),
136
+ 0 : Color (blend (this [0 ]! .colorValue , sourceColor.colorValue )),
137
+ 10 : Color (blend (this [10 ]! .colorValue , sourceColor.colorValue )),
138
+ 20 : Color (blend (this [20 ]! .colorValue , sourceColor.colorValue )),
139
+ 30 : Color (blend (this [30 ]! .colorValue , sourceColor.colorValue )),
140
+ 40 : Color (blend (this [40 ]! .colorValue , sourceColor.colorValue )),
141
+ 50 : Color (blend (this [50 ]! .colorValue , sourceColor.colorValue )),
142
+ 60 : Color (blend (this [60 ]! .colorValue , sourceColor.colorValue )),
143
+ 70 : Color (blend (this [70 ]! .colorValue , sourceColor.colorValue )),
144
+ 80 : Color (blend (this [80 ]! .colorValue , sourceColor.colorValue )),
145
+ 90 : Color (blend (this [90 ]! .colorValue , sourceColor.colorValue )),
146
+ 95 : Color (blend (this [95 ]! .colorValue , sourceColor.colorValue )),
147
+ 98 : Color (blend (this [98 ]! .colorValue , sourceColor.colorValue )),
148
+ 99 : Color (blend (this [99 ]! .colorValue , sourceColor.colorValue )),
149
+ 100 : Color (blend (this [100 ]! .colorValue , sourceColor.colorValue )),
149
150
},
150
151
);
151
152
}
@@ -154,7 +155,7 @@ class TonalColor extends ColorSwatch<int> {
154
155
final swatch = ColorSwatch .lerp (a, b, t);
155
156
if (swatch == null ) return null ;
156
157
return TonalColor (
157
- swatch.value ,
158
+ swatch.colorValue ,
158
159
< int , Color > {
159
160
0 : swatch[0 ]! ,
160
161
10 : swatch[10 ]! ,
0 commit comments