update to init loading

This commit is contained in:
Mohamed Nouffer
2023-01-03 12:00:28 +05:30
parent f8a79842e3
commit d56ed36be5
4 changed files with 18 additions and 6 deletions

View File

@ -76,15 +76,19 @@ class LocationService{
return null;
}
static Future<List<dynamic>?> getLocationsExt() async {
static Future<List<dynamic>?> getLocationsExt(String token) async {
List<dynamic> ext = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/locsext/';
//String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
final response = await http.get(Uri.parse(url),
final response = await http.post(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Token ${token}'
},
body: jsonEncode(<String, String>{
'token': token,
})
);
if (response.statusCode == 200) {