Files
daily_mobileapp_merchant/lib/Controller/Tenantlocation/Tenantlocationcontroller.dart
2026-05-27 10:35:09 +05:30

40 lines
1.0 KiB
Dart

import 'package:get/get.dart';
import 'package:rounded_loading_button_plus/rounded_loading_button.dart';
import '../../Data/Repository/Tenantlocation/Getlocationrepository.dart';
import '../../Model/Response/Tenantlocation/Getlocationbyidresponse.dart';
class TenantLocationController extends GetxController{
String? latitude;
String? longitude;
String? address;
int selectedAddressIndex = -1;
int locationId = 0;
List<TenantLocationDetails>getLocations = [];
final RoundedLoadingButtonController btnController = RoundedLoadingButtonController();
GetLocationsRepository getLocationsRepository= GetLocationsRepository();
getTenantLocation()async {
GetLocationByTenantId? result = await getLocationsRepository.getTenantLocationById();
if (result?.code == 200) {
getLocations = result?.details??[];
update();
}
print('resultgetLocation ${result?.toJson()}');
}
@override
void onInit() {
getTenantLocation();
// TODO: implement onInit
super.onInit();
}
}