File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
gogrocy/lib/core/services Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:convert' ;
2
2
import 'dart:io' ;
3
3
import 'package:flutter/material.dart' ;
4
- import 'package:gogrocy/core/models/Address.dart' as address;
5
4
import 'package:gogrocy/core/models/Address.dart' ;
6
5
import 'package:gogrocy/core/models/Orders.dart' ;
7
6
import 'package:gogrocy/core/models/ProductsByCity.dart' ;
Original file line number Diff line number Diff line change @@ -45,11 +45,14 @@ class SharedPrefsService {
45
45
final SharedPreferences prefs = await SharedPreferences .getInstance ();
46
46
String city= prefs.getString ("city" );
47
47
if (city== null ){
48
- List <Address > address= await apis.getAddresses ();
49
- setCity (address[0 ].city);
50
- return address[0 ].city;
48
+ //List<Address> address=await apis.getAddresses();
49
+ //setCity(address[0].city);
50
+ return null ;
51
+ }
52
+ else {
53
+ print (city);
54
+ return city;
51
55
}
52
- else return city;
53
56
}
54
57
55
58
}
You can’t perform that action at this time.
0 commit comments