INFRA: Set Up Project.
This commit is contained in:
28
lib/controllers/discount_restaurant_list_controller.dart
Normal file
28
lib/controllers/discount_restaurant_list_controller.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:customer/models/coupon_model.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class DiscountRestaurantListController extends GetxController {
|
||||
RxBool isLoading = true.obs;
|
||||
RxList<VendorModel> vendorList = <VendorModel>[].obs;
|
||||
RxList<CouponModel> couponList = <CouponModel>[].obs;
|
||||
|
||||
RxString title = "Restaurants".obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
getArgument();
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
Future<void> getArgument() async {
|
||||
dynamic argumentData = Get.arguments;
|
||||
if (argumentData != null) {
|
||||
vendorList.value = argumentData['vendorList'];
|
||||
couponList.value = argumentData['couponList'];
|
||||
title.value = argumentData['title'] ?? "Restaurants";
|
||||
}
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user