9/8/1-captin

This commit is contained in:
Hamza-Ayed
2023-09-08 18:25:14 +03:00
parent c2600c5938
commit a626915f45
69 changed files with 1808 additions and 316 deletions

View File

@@ -28,7 +28,7 @@ class OrderHistoryController extends GetxController {
var jsonDecoded = jsonDecode(res);
orderHistoryListPassenger = jsonDecoded['data'];
print(orderHistoryListPassenger);
// print(orderHistoryListPassenger);
isloading = false;
update();
}

View File

@@ -0,0 +1,32 @@
import 'dart:convert';
import 'package:get/get.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/controller/functions/crud.dart';
class PromosController extends GetxController {
List<dynamic> promoList = [];
bool isloading = true;
@override
void onInit() {
getPromoBytody();
super.onInit();
}
Future getPromoBytody() async {
var res = await CRUD().get(link: AppLink.getPromoBytody, payload: {});
if (res.toString() == 'failure') {
Get.snackbar('failure', 'message');
isloading = false;
update();
} else {
var jsonDecoded = jsonDecode(res);
promoList = jsonDecoded['message'];
print(promoList);
isloading = false;
update();
}
}
}