Skip to content

Commit 83ff6c9

Browse files
committed
Fix backward compatibility with Flutter@master & beta
1 parent 49d8258 commit 83ff6c9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/core/test/src/core_legacy_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@ void main() {
5959

6060
testWidgets('tsb.build', (tester) async {
6161
const html = '<span class="build-op">Foo</span>';
62+
const abcdef = Color(0x00abcdef);
6263
final buildOp = BuildOp(
6364
onTree: (_, tree) => tree.append(
6465
WidgetBit.block(
6566
tree,
6667
WidgetPlaceholder(
6768
builder: (context, child) {
6869
final style = tree.tsb.build(context).style;
69-
final colored = style.copyWith(color: const Color(0x00abcdef));
70+
final colored = style.copyWith(color: abcdef);
7071
return Text('hi', style: colored);
7172
},
7273
),
@@ -83,7 +84,7 @@ void main() {
8384
),
8485
useExplainer: false,
8586
);
86-
expect(explained, contains('0x00abcdef'));
87+
expect(explained, contains(abcdef.toString()));
8788
});
8889
});
8990

packages/core/test/tag_li_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,14 +1000,16 @@ Future<void> main() async {
10001000
'<ul style="color: #f00"><li>Foo</li></ul>',
10011001
useExplainer: false,
10021002
);
1003-
expect(disc, contains('Color(0xffff0000)'));
1003+
const red = Color(0xffff0000);
1004+
expect(disc, contains(red.toString()));
10041005

10051006
final circle = await explain(
10061007
tester,
10071008
'<ul style="color: #0f0"><li>Foo</li></ul>',
10081009
useExplainer: false,
10091010
);
1010-
expect(circle, contains('Color(0xff00ff00)'));
1011+
const green = Color(0xff00ff00);
1012+
expect(circle, contains(green.toString()));
10111013
});
10121014
});
10131015
}

0 commit comments

Comments
 (0)