getstorefaces static method
Implementation
static Future<List<GetData>> getstorefaces() async {
String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVmlyZW5kcmEgc2hpbHBrYXIiLCJhZ2VudElEIjoiNjM4NDU1YzA1ZjEyYzI3OWZlMThlMzQ2Iiwib3JnSUQiOiI2Mzg0NTFkMjVmMTJjMjc5ZmUxOGUyZDEiLCJ1c2VybmFtZSI6InZpcmVuZHJhQGdtYWlsLmNvbSIsImlhdCI6MTY4MzU0MDM4NH0.yMiYAuzVO102VanUvO04u9RJiYzyDluDtGFEPcsM1tY";
http.Response responce = await http.get(
Uri.parse("http://43.205.35.164:5000/v1/DID/Get_Face_Data"),
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
});
if (responce.statusCode == 200) {
var data = jsonDecode(responce.body);
GetUserStore user = GetUserStore.fromJson(data);
return user.data ?? <GetData>[];
} else {
var data = jsonDecode(responce.body);
GetUserStore user = GetUserStore.fromJson(data);
return user.data ?? <GetData>[];
}
}