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;
  }


}
