replace apiModel with null
arror apear when no connexion in the example
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -8,7 +8,7 @@ class HomeProvider { | @@ -8,7 +8,7 @@ class HomeProvider { | ||
8 | return ApiModel.fromJson(response.data); | 8 | return ApiModel.fromJson(response.data); |
9 | } catch (e) { | 9 | } catch (e) { |
10 | print(e.toString()); | 10 | print(e.toString()); |
11 | - return ApiModel(); | 11 | + return null; |
12 | } | 12 | } |
13 | } | 13 | } |
14 | } | 14 | } |
-
Please register or login to post a comment