diff --git a/.fvm/flutter_sdk b/.fvm/flutter_sdk new file mode 120000 index 0000000..9dc23ec --- /dev/null +++ b/.fvm/flutter_sdk @@ -0,0 +1 @@ +/Users/nemoryoliver/fvm/versions/stable \ No newline at end of file diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json new file mode 100644 index 0000000..1c922f8 --- /dev/null +++ b/.fvm/fvm_config.json @@ -0,0 +1,3 @@ +{ + "flutterSdkVersion": "stable" +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a8f1b96 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": "/Users/nemoryoliver/fvm/versions/stable" +} \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index dd4d3d6..f6ea6a3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -62,4 +62,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.10.0 +COCOAPODS: 1.10.1 diff --git a/lib/core/apis/base.api.dart b/lib/core/apis/base.api.dart index 61a0bd4..e772615 100644 --- a/lib/core/apis/base.api.dart +++ b/lib/core/apis/base.api.dart @@ -51,8 +51,13 @@ class BaseAPI extends GetxController { return Right(response.data); } on dio.DioError catch (e) { logger.e( - 'dio error. function: $function, error: ${e.error}, data: ${e.response.data}'); - if (e.response.data != null) { + 'dio error. function: $function, error: ${e.error}, data: ${e.response?.data}'); + + if (e.response == null) { + return Left(ApiError(code: 1, message: 'Null Response')); + } + + if (e.response?.data != null) { return Left(ApiError.fromJson(e.response.data)); } @@ -60,7 +65,7 @@ class BaseAPI extends GetxController { ApiError( code: 1, message: - 'Status: ${e.response.statusCode}, Error: ${e.error}, Data: ${e.response.data}', + 'Status: ${e.response.statusCode}, Error: ${e.error}, Data: ${e.response?.data}', ), ); } catch (e) { diff --git a/pubspec.lock b/pubspec.lock index 10e145f..f540302 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -84,7 +84,7 @@ packages: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.10.11" + version: "1.11.0" build_runner_core: dependency: transitive description: @@ -162,13 +162,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0-nullsafety.3" - color: - dependency: transitive - description: - name: color - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" connectivity: dependency: "direct main" description: @@ -334,7 +327,7 @@ packages: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "0.1.9" + version: "0.2.9" flutter_spinkit: dependency: "direct main" description: @@ -535,7 +528,7 @@ packages: name: package_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.3+2" + version: "0.4.3+4" path: dependency: transitive description: @@ -946,7 +939,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.5.1" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a9f0e4b..ef8c2ee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: either_option: 1.0.6 #INFO device_info: 1.0.0 - package_info: 0.4.3+2 + package_info: 0.4.3+4 #MEDIA cached_network_image: 2.5.0 flutter_spinkit: 4.1.2+1 @@ -40,10 +40,10 @@ dependencies: # DEVELOPER DEPENDENCIES dev_dependencies: - build_runner: 1.10.11 + build_runner: 1.11.0 flutter_launcher_icons: 0.8.1 hive_generator: 0.8.2 - flutter_native_splash: 0.1.9 + flutter_native_splash: 0.2.9 # SPLASH SCREEN GENERATOR flutter_native_splash: