mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix text_style_text.dart to be Dart 2 compliant. (#14559)
In Dart 2 mode we throw different exception: compiler generates throw of a compilation error instead of runtime throwing noSuchMethod.
This commit is contained in:
parent
7982694a0c
commit
90ddb2370b
@ -23,7 +23,7 @@ void main() {
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 123.0,
|
||||
);
|
||||
expect(() { s1.fontFamily = 'test'; }, throwsA(isNoSuchMethodError)); // ignore: ASSIGNMENT_TO_FINAL
|
||||
expect(() { s1.fontFamily = 'test'; }, throwsA(const isInstanceOf<Error>())); // ignore: ASSIGNMENT_TO_FINAL
|
||||
expect(s1.fontFamily, isNull);
|
||||
expect(s1.fontSize, 10.0);
|
||||
expect(s1.fontWeight, FontWeight.w800);
|
||||
|
Loading…
Reference in New Issue
Block a user