File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
26
26
apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27
27
28
28
android {
29
- compileSdkVersion flutter . compileSdkVersion
29
+ compileSdkVersion 33
30
30
31
31
compileOptions {
32
32
sourceCompatibility JavaVersion . VERSION_1_8
@@ -44,8 +44,8 @@ android {
44
44
defaultConfig {
45
45
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46
46
applicationId " com.hoc.node_auth"
47
- minSdkVersion flutter . minSdkVersion
48
- targetSdkVersion flutter . targetSdkVersion
47
+ minSdkVersion 21
48
+ targetSdkVersion 33
49
49
versionCode flutterVersionCode. toInteger()
50
50
versionName flutterVersionName
51
51
multiDexEnabled true
Original file line number Diff line number Diff line change @@ -28,8 +28,16 @@ class ApiService implements RemoteDataSource {
28
28
rethrow ;
29
29
} on SocketException catch (e, s) {
30
30
throw RemoteDataSourceException ('No internet connection' , e, s);
31
- } on SimpleHttpClientException catch (e, s) {
32
- throw RemoteDataSourceException ('Http error' , e, s);
31
+ } on SimpleTimeoutException catch (e, s) {
32
+ throw RemoteDataSourceException ('Timeout error' , e, s);
33
+ } on SimpleErrorResponseException catch (e, s) {
34
+ String message;
35
+ try {
36
+ message = jsonDecode (e.errorResponseBody)['message' ] as String ;
37
+ } catch (_) {
38
+ message = 'Http error' ;
39
+ }
40
+ throw RemoteDataSourceException (message, e, s);
33
41
} catch (e, s) {
34
42
throw RemoteDataSourceException ('Other error' , e, s);
35
43
}
You can’t perform that action at this time.
0 commit comments