second commit
This commit is contained in:
23
lib/Data/Repository/Rider/get_rider_repo.dart
Normal file
23
lib/Data/Repository/Rider/get_rider_repo.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../../Helper/Constants/Apiconstants.dart';
|
||||
import '../../../Model/Response/Riders/get_rider_model.dart';
|
||||
import '../../Provider/Riders/get_rider_provider.dart';
|
||||
|
||||
class RidersRepository{
|
||||
|
||||
RidersProvider ridersProvider = RidersProvider();
|
||||
|
||||
int? tenantId = 0;
|
||||
int? locationId = 0;
|
||||
|
||||
Future<GetRiderPoolsModel?> getRiders(appLocationId) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
tenantId = prefs.getInt('tenantId');
|
||||
locationId = prefs.getInt('locationId');
|
||||
var result = await ridersProvider.getRiders('${ApiConstants.getRiders}?tenantid=${tenantId}&location=$locationId');
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user