diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart index 98a9781f0d..1e20775d1c 100644 --- a/packages/flutter/test/painting/text_style_test.dart +++ b/packages/flutter/test/painting/text_style_test.dart @@ -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())); // ignore: ASSIGNMENT_TO_FINAL expect(s1.fontFamily, isNull); expect(s1.fontSize, 10.0); expect(s1.fontWeight, FontWeight.w800);