@@ -130,12 +130,12 @@ void main() {
130
130
group ('StreamColorSwatch' , () {
131
131
group ('light' , () {
132
132
test ('base' , () {
133
- check (StreamColorSwatch (0xffffffff )).base .equals (const Color (0xffffffff ));
133
+ check (StreamColorSwatch . light (0xffffffff )).base .equals (const Color (0xffffffff ));
134
134
});
135
135
136
136
test ('unreadCountBadgeBackground' , () {
137
137
void runCheck (int base , Color expected) {
138
- check (StreamColorSwatch (base )).unreadCountBadgeBackground.equals (expected);
138
+ check (StreamColorSwatch . light (base )).unreadCountBadgeBackground.equals (expected);
139
139
}
140
140
141
141
// Check against everything in ZULIP_ASSIGNMENT_COLORS and EXTREME_COLORS
@@ -197,7 +197,7 @@ void main() {
197
197
198
198
test ('iconOnPlainBackground' , () {
199
199
void runCheck (int base , Color expected) {
200
- check (StreamColorSwatch (base )).iconOnPlainBackground.equals (expected);
200
+ check (StreamColorSwatch . light (base )).iconOnPlainBackground.equals (expected);
201
201
}
202
202
203
203
// Check against everything in ZULIP_ASSIGNMENT_COLORS
@@ -238,7 +238,7 @@ void main() {
238
238
239
239
test ('iconOnBarBackground' , () {
240
240
void runCheck (int base , Color expected) {
241
- check (StreamColorSwatch (base )).iconOnBarBackground.equals (expected);
241
+ check (StreamColorSwatch . light (base )).iconOnBarBackground.equals (expected);
242
242
}
243
243
244
244
// Check against everything in ZULIP_ASSIGNMENT_COLORS
@@ -279,7 +279,7 @@ void main() {
279
279
280
280
test ('barBackground' , () {
281
281
void runCheck (int base , Color expected) {
282
- check (StreamColorSwatch (base )).barBackground.equals (expected);
282
+ check (StreamColorSwatch . light (base )).barBackground.equals (expected);
283
283
}
284
284
285
285
// Check against everything in ZULIP_ASSIGNMENT_COLORS
@@ -516,7 +516,7 @@ void main() {
516
516
});
517
517
518
518
test ('lerp (different a, b)' , () {
519
- final swatchA = StreamColorSwatch (0xff76ce90 );
519
+ final swatchA = StreamColorSwatch . light (0xff76ce90 );
520
520
521
521
// TODO(#95) use something like StreamColorSwatch.dark(), once
522
522
// implemented, and remove debugFromBaseAndSwatch
@@ -551,7 +551,7 @@ void main() {
551
551
test ('lerp (identical a, b)' , () {
552
552
check (StreamColorSwatch .lerp (null , null , 0.0 )).isNull ();
553
553
554
- final swatch = StreamColorSwatch (0xff76ce90 );
554
+ final swatch = StreamColorSwatch . light (0xff76ce90 );
555
555
check (StreamColorSwatch .lerp (swatch, swatch, 0.5 )).isNotNull ()
556
556
..identicalTo (swatch)
557
557
..base .equals (const Color (0xff76ce90 ));
0 commit comments