@@ -214,7 +214,7 @@ void main() {
214
214
// The transition's stack is ordered. The bottom middle is inserted first.
215
215
final RenderParagraph bottomMiddle =
216
216
tester.renderObject (flying (tester, find.text ('Page 1' )).first);
217
- expect (bottomMiddle.text.style! .color, const Color (0xff000306 ));
217
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
218
218
expect (bottomMiddle.text.style! .fontWeight, FontWeight .w600);
219
219
expect (bottomMiddle.text.style! .fontFamily, 'CupertinoSystemText' );
220
220
expect (bottomMiddle.text.style! .letterSpacing, - 0.41 );
@@ -225,7 +225,7 @@ void main() {
225
225
// are flipped.
226
226
final RenderParagraph topBackLabel =
227
227
tester.renderObject (flying (tester, find.text ('Page 1' )).last);
228
- expect (topBackLabel.text.style! .color, const Color (0xff000306 ));
228
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
229
229
expect (topBackLabel.text.style! .fontWeight, FontWeight .w600);
230
230
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemText' );
231
231
expect (topBackLabel.text.style! .letterSpacing, - 0.41 );
@@ -234,14 +234,14 @@ void main() {
234
234
235
235
// Move animation further a bit.
236
236
await tester.pump (const Duration (milliseconds: 200 ));
237
- expect (bottomMiddle.text.style! .color, const Color (0xff005ec5 ));
237
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xff005ec5 ) ));
238
238
expect (bottomMiddle.text.style! .fontWeight, FontWeight .w400);
239
239
expect (bottomMiddle.text.style! .fontFamily, 'CupertinoSystemText' );
240
240
expect (bottomMiddle.text.style! .letterSpacing, - 0.41 );
241
241
242
242
checkOpacity (tester, flying (tester, find.text ('Page 1' )).first, 0.0 );
243
243
244
- expect (topBackLabel.text.style! .color, const Color (0xff005ec5 ));
244
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff005ec5 ) ));
245
245
expect (topBackLabel.text.style! .fontWeight, FontWeight .w400);
246
246
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemText' );
247
247
expect (topBackLabel.text.style! .letterSpacing, - 0.41 );
@@ -262,7 +262,7 @@ void main() {
262
262
// The transition's stack is ordered. The bottom middle is inserted first.
263
263
final RenderParagraph bottomMiddle =
264
264
tester.renderObject (flying (tester, find.text ('Page 1' )).first);
265
- expect (bottomMiddle.text.style! .color, const Color (0xfff8fbff ));
265
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xfff8fbff ) ));
266
266
expect (bottomMiddle.text.style! .fontWeight, FontWeight .w600);
267
267
expect (bottomMiddle.text.style! .fontFamily, 'CupertinoSystemText' );
268
268
expect (bottomMiddle.text.style! .letterSpacing, - 0.41 );
@@ -273,7 +273,7 @@ void main() {
273
273
// are flipped.
274
274
final RenderParagraph topBackLabel =
275
275
tester.renderObject (flying (tester, find.text ('Page 1' )).last);
276
- expect (topBackLabel.text.style! .color, const Color (0xfff8fbff ));
276
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xfff8fbff ) ));
277
277
expect (topBackLabel.text.style! .fontWeight, FontWeight .w600);
278
278
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemText' );
279
279
expect (topBackLabel.text.style! .letterSpacing, - 0.41 );
@@ -282,14 +282,14 @@ void main() {
282
282
283
283
// Move animation further a bit.
284
284
await tester.pump (const Duration (milliseconds: 200 ));
285
- expect (bottomMiddle.text.style! .color, const Color (0xff409fff ));
285
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xff409fff ) ));
286
286
expect (bottomMiddle.text.style! .fontWeight, FontWeight .w400);
287
287
expect (bottomMiddle.text.style! .fontFamily, 'CupertinoSystemText' );
288
288
expect (bottomMiddle.text.style! .letterSpacing, - 0.41 );
289
289
290
290
checkOpacity (tester, flying (tester, find.text ('Page 1' )).first, 0.0 );
291
291
292
- expect (topBackLabel.text.style! .color, const Color (0xff409fff ));
292
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff409fff ) ));
293
293
expect (topBackLabel.text.style! .fontWeight, FontWeight .w400);
294
294
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemText' );
295
295
expect (topBackLabel.text.style! .letterSpacing, - 0.41 );
@@ -365,7 +365,7 @@ void main() {
365
365
// The transition's stack is ordered. The bottom middle is inserted first.
366
366
final RenderParagraph bottomMiddle =
367
367
tester.renderObject (flying (tester, find.text ('Page 1' )).first);
368
- expect (bottomMiddle.text.style! .color, const Color (0xff000306 ));
368
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
369
369
370
370
expect (
371
371
tester.getTopLeft (flying (tester, find.text ('Page 1' )).first),
@@ -379,7 +379,7 @@ void main() {
379
379
// are flipped.
380
380
final RenderParagraph topBackLabel =
381
381
tester.renderObject (flying (tester, find.text ('Page 1' )).last);
382
- expect (topBackLabel.text.style! .color, const Color (0xff000306 ));
382
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
383
383
expect (
384
384
tester.getTopLeft (flying (tester, find.text ('Page 1' )).last),
385
385
const Offset (
@@ -417,7 +417,7 @@ void main() {
417
417
// The transition's stack is ordered. The bottom middle is inserted first.
418
418
final RenderParagraph bottomMiddle =
419
419
tester.renderObject (flying (tester, find.text ('Page 1' )).first);
420
- expect (bottomMiddle.text.style! .color, const Color (0xff000306 ));
420
+ expect (bottomMiddle.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
421
421
expect (
422
422
tester.getTopLeft (flying (tester, find.text ('Page 1' )).first),
423
423
const Offset (
@@ -430,7 +430,7 @@ void main() {
430
430
// are flipped.
431
431
final RenderParagraph topBackLabel =
432
432
tester.renderObject (flying (tester, find.text ('Page 1' )).last);
433
- expect (topBackLabel.text.style! .color, const Color (0xff000306 ));
433
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
434
434
expect (
435
435
tester.getTopLeft (flying (tester, find.text ('Page 1' )).last),
436
436
const Offset (
@@ -1116,27 +1116,27 @@ void main() {
1116
1116
// The transition's stack is ordered. The bottom large title is inserted first.
1117
1117
final RenderParagraph bottomLargeTitle =
1118
1118
tester.renderObject (flying (tester, find.text ('Page 1' )).first);
1119
- expect (bottomLargeTitle.text.style! .color, const Color (0xff000306 ));
1119
+ expect (bottomLargeTitle.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
1120
1120
expect (bottomLargeTitle.text.style! .fontWeight, FontWeight .w700);
1121
1121
expect (bottomLargeTitle.text.style! .fontFamily, 'CupertinoSystemDisplay' );
1122
1122
expect (bottomLargeTitle.text.style! .letterSpacing, moreOrLessEquals (0.35967791542410854 ));
1123
1123
1124
1124
// The top back label is styled exactly the same way.
1125
1125
final RenderParagraph topBackLabel =
1126
1126
tester.renderObject (flying (tester, find.text ('Page 1' )).last);
1127
- expect (topBackLabel.text.style! .color, const Color (0xff000306 ));
1127
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff000306 ) ));
1128
1128
expect (topBackLabel.text.style! .fontWeight, FontWeight .w700);
1129
1129
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemDisplay' );
1130
1130
expect (topBackLabel.text.style! .letterSpacing, moreOrLessEquals (0.35967791542410854 ));
1131
1131
1132
1132
// Move animation further a bit.
1133
1133
await tester.pump (const Duration (milliseconds: 200 ));
1134
- expect (bottomLargeTitle.text.style! .color, const Color (0xff005ec5 ));
1134
+ expect (bottomLargeTitle.text.style! .color, isSameColorAs ( const Color (0xff005ec5 ) ));
1135
1135
expect (bottomLargeTitle.text.style! .fontWeight, FontWeight .w500);
1136
1136
expect (bottomLargeTitle.text.style! .fontFamily, 'CupertinoSystemText' );
1137
1137
expect (bottomLargeTitle.text.style! .letterSpacing, moreOrLessEquals (- 0.23270857974886894 ));
1138
1138
1139
- expect (topBackLabel.text.style! .color, const Color (0xff005ec5 ));
1139
+ expect (topBackLabel.text.style! .color, isSameColorAs ( const Color (0xff005ec5 ) ));
1140
1140
expect (topBackLabel.text.style! .fontWeight, FontWeight .w500);
1141
1141
expect (topBackLabel.text.style! .fontFamily, 'CupertinoSystemText' );
1142
1142
expect (topBackLabel.text.style! .letterSpacing, moreOrLessEquals (- 0.23270857974886894 ));
0 commit comments