add shipment in processing, update package, processing and receiving
This commit is contained in:
@@ -67,11 +67,15 @@ Future<dynamic> requestAPI(String path, method,
|
||||
path,
|
||||
data: payload,
|
||||
);
|
||||
var data = Status.fromJson(response.data);
|
||||
if (data.status == 'Ok') {
|
||||
return response.data["data"];
|
||||
} else {
|
||||
throw Exception(data.message);
|
||||
if (response.statusCode == HttpStatus.ok) {
|
||||
var data = Status.fromJson(response.data);
|
||||
if (data.status == 'Ok') {
|
||||
return response.data["data"];
|
||||
} else {
|
||||
throw Exception(data.message);
|
||||
}
|
||||
}else{
|
||||
throw Exception( "${response.statusCode} - ${response.statusMessage}");
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warning("path:$path, api:$e");
|
||||
|
||||
@@ -10,6 +10,7 @@ const labelColor = const Color(0xFF757575);
|
||||
var dividerColor = Colors.grey.shade400;
|
||||
const dangerColor = const Color(0xffff0606);
|
||||
const hintTextColor = Color.fromARGB(255, 187, 187, 187);
|
||||
const linkColor= Color(0xff0000EE);
|
||||
|
||||
const TextStyle labelStyle =
|
||||
TextStyle(fontSize: 20, color: labelColor, fontWeight: FontWeight.w500);
|
||||
|
||||
Reference in New Issue
Block a user