File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 4.0.1-dev
2+
3+ - Fix a potential error with ` checked: true ` when ` ArgumentError.message ` is
4+ ` null ` .
5+
16## 4.0.0
27
38- Support null safety.
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class CheckedFromJsonException implements Exception {
104104 innerStack = null ;
105105
106106 CheckedFromJsonException ._(
107- this .innerError,
107+ Object this .innerError,
108108 this .innerStack,
109109 this .map,
110110 this .key, {
@@ -113,9 +113,12 @@ class CheckedFromJsonException implements Exception {
113113 badKey = innerError is BadKeyException ,
114114 message = _getMessage (innerError);
115115
116- static String ? _getMessage (Object ? error) {
116+ static String _getMessage (Object error) {
117117 if (error is ArgumentError ) {
118- return error.message? .toString ();
118+ final message = error.message;
119+ if (message != null ) {
120+ return message.toString ();
121+ }
119122 }
120123 if (error is BadKeyException ) {
121124 return error.message;
Original file line number Diff line number Diff line change 11name : json_annotation
2- version : 4.0.0
2+ version : 4.0.1-dev
33description : >-
44 Classes and helper functions that support JSON code generation via the
55 `json_serializable` package.
You can’t perform that action at this time.
0 commit comments