update new features and flutter 3.13

This commit is contained in:
Mohamed Nouffer
2023-09-04 22:46:53 +05:30
parent 2ab96cc3d0
commit 3f157d7ddf
22 changed files with 2160 additions and 1703 deletions

View File

@ -118,6 +118,26 @@ class AuthService{
static Future<List<dynamic>?> userForToken(String token) async {
Map<String, dynamic> cats = {};
String serverUrl = ConstValues.currentServer();
String url = '$serverUrl/api/user/';
print('++++++++$url');
print("---- UserDetails url is $url");
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Token $token'
},
);
if (response.statusCode == 200) {
cats = json.decode(utf8.decode(response.bodyBytes));
print("--- eeeeee $cats ----");
}
return [{"user":cats}];
}