import 'dart:convert';
import 'package:http/http.dart';
import '../../../Model/Response/Partners/Getpartnerinforequest.dart';

class GetPartnersProvider{

  Future<GetPartnersInfo?> getPartners(String urldata) async {
    GetPartnersInfo? getLocationById;
    try {

      final url = Uri.parse('$urldata',);

      final response = await get(url,
        headers: {
          'Content-Type': 'application/json',
          'Accept': 'application/json',
          // 'Authorization': '$token',
        },
      );
      print('getPartners!!!!!!!!${response.body}');
      print('getPartnersproviderurldata!!!!!!!!${urldata.toString()}');
      Map<String, dynamic> parsedJson = json.decode(response.body.toString());

      getLocationById = GetPartnersInfo.fromJson(parsedJson);

    } catch (e) {
      print(e.toString());
      print("error");
    }
    return getLocationById;
  }

}