Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d6995aa2
Unverified
Commit
d6995aa2
authored
Nov 29, 2022
by
Michael Thomsen
Committed by
GitHub
Nov 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore NullThrownError deprecation (#116135)
* Ignore NullThrownError deprecation * Fix whitespace
parent
8535e716
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+1
-1
_compute_caller_unsound_null_safety_error.dart
...foundation/_compute_caller_unsound_null_safety_error.dart
+1
-1
assertions_test.dart
packages/flutter/test/foundation/assertions_test.dart
+2
-1
No files found.
packages/flutter/lib/src/foundation/assertions.dart
View file @
d6995aa2
...
...
@@ -672,7 +672,7 @@ class FlutterErrorDetails with Diagnosticable {
super
.
debugFillProperties
(
properties
);
final
DiagnosticsNode
verb
=
ErrorDescription
(
'thrown
${ context != null ? ErrorDescription(" $context") : ""}
'
);
final
Diagnosticable
?
diagnosticable
=
_exceptionToDiagnosticable
();
if
(
exception
is
NullThrownError
)
{
if
(
exception
is
NullThrownError
)
{
// ignore: deprecated_member_use
properties
.
add
(
ErrorDescription
(
'The null value was
$verb
.'
));
}
else
if
(
exception
is
num
)
{
properties
.
add
(
ErrorDescription
(
'The number
$exception
was
$verb
.'
));
...
...
packages/flutter/test/foundation/_compute_caller_unsound_null_safety_error.dart
View file @
d6995aa2
...
...
@@ -15,7 +15,7 @@ void main() async {
try
{
await
compute
(
throwNull
,
null
);
}
catch
(
e
)
{
if
(
e
is
!
TypeError
&&
e
is
!
NullThrownError
)
{
if
(
e
is
!
TypeError
&&
e
is
!
NullThrownError
)
{
// ignore: deprecated_member_use
throw
Exception
(
'compute returned bad result'
);
}
}
...
...
packages/flutter/test/foundation/assertions_test.dart
View file @
d6995aa2
...
...
@@ -60,7 +60,7 @@ void main() {
);
expect
(
FlutterErrorDetails
(
exception:
NullThrownError
(),
exception:
NullThrownError
(),
// ignore: deprecated_member_use
library
:
'LIBRARY'
,
context:
ErrorDescription
(
'CONTEXTING'
),
informationCollector:
()
sync
*
{
...
...
@@ -113,6 +113,7 @@ void main() {
'═════════════════════════════════════════════════════════════════
\n
'
,
);
expect
(
// ignore: deprecated_member_use
FlutterErrorDetails
(
exception:
NullThrownError
()).
toString
(),
'══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞══════════════════════
\n
'
'The null value was thrown.
\n
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment