Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit d6995aa

Browse files
authored
Ignore NullThrownError deprecation (#116135)
* Ignore NullThrownError deprecation * Fix whitespace
1 parent 8535e71 commit d6995aa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

packages/flutter/lib/src/foundation/assertions.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ class FlutterErrorDetails with Diagnosticable {
672672
super.debugFillProperties(properties);
673673
final DiagnosticsNode verb = ErrorDescription('thrown${ context != null ? ErrorDescription(" $context") : ""}');
674674
final Diagnosticable? diagnosticable = _exceptionToDiagnosticable();
675-
if (exception is NullThrownError) {
675+
if (exception is NullThrownError) { // ignore: deprecated_member_use
676676
properties.add(ErrorDescription('The null value was $verb.'));
677677
} else if (exception is num) {
678678
properties.add(ErrorDescription('The number $exception was $verb.'));

packages/flutter/test/foundation/_compute_caller_unsound_null_safety_error.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void main() async {
1515
try {
1616
await compute(throwNull, null);
1717
} catch (e) {
18-
if (e is! TypeError && e is! NullThrownError) {
18+
if (e is! TypeError && e is! NullThrownError) { // ignore: deprecated_member_use
1919
throw Exception('compute returned bad result');
2020
}
2121
}

packages/flutter/test/foundation/assertions_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void main() {
6060
);
6161
expect(
6262
FlutterErrorDetails(
63-
exception: NullThrownError(),
63+
exception: NullThrownError(), // ignore: deprecated_member_use
6464
library: 'LIBRARY',
6565
context: ErrorDescription('CONTEXTING'),
6666
informationCollector: () sync* {
@@ -113,6 +113,7 @@ void main() {
113113
'═════════════════════════════════════════════════════════════════\n',
114114
);
115115
expect(
116+
// ignore: deprecated_member_use
116117
FlutterErrorDetails(exception: NullThrownError()).toString(),
117118
'══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞══════════════════════\n'
118119
'The null value was thrown.\n'

0 commit comments

Comments
 (0)