second commit

This commit is contained in:
Anbarasu
2026-05-27 10:35:09 +05:30
parent c53794c04c
commit 1435ac47b0
501 changed files with 52818 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import 'package:shared_preferences/shared_preferences.dart';
import '../../../../Helper/Constants/Apiconstants.dart';
import '../../../../Model/Response/Tenantlocation/Getlocationbyidresponse.dart';
import '../../../Provider/Location/GetLocation/getlocationprovider.dart';
class GetLocationsRepository{
GetLocationsProvider getLocationsProvider = GetLocationsProvider();
int tenantId = 0;
int locationId = 0;
Future<GetLocationByTenantId?> getLocationById() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
tenantId = prefs.getInt('tenantId')!;
locationId = prefs.getInt('locationId')!;
var result = await getLocationsProvider.getLocationById('${ApiConstants.getLocationById}?tenantid=$tenantId',);
return result;
}
}