import 'dart:convert';
import 'package:http/http.dart';
import '../../../Model/Response/Getcustomeraddress/GetCustomerAddress.dart';


class GetCustomersAddressProvider{

  Future<GetCustomerAddress?> getCustomerAddress(String urldata,) async {
    GetCustomerAddress? getCustomerAddress;
    try {

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

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

      getCustomerAddress = GetCustomerAddress.fromJson(parsedJson);

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

}