Skip to content

Commit

Permalink
handle json format error
Browse files Browse the repository at this point in the history
  • Loading branch information
zmtzawqlp committed Feb 12, 2022
1 parent 01abde1 commit 5e440e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Flutter/json_to_dart/lib/main_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class MainController extends GetxController {
// handleError(error, stackTrace);
// });
if (extendedObject == null) {
SmartDialog.dismiss();
showAlertDialog(appLocalizations.illegalJson, Icons.error);
return;
}
Expand Down
9 changes: 8 additions & 1 deletion Flutter/json_to_dart/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -582,7 +589,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.3"
version: "0.4.8"
time:
dependency: transitive
description:
Expand Down

0 comments on commit 5e440e7

Please sign in to comment.