kfUpdateAddress static method
Updates an existing address by ID.
Implementation
static Future<dynamic> kfUpdateAddress({
required String addressId,
required String userAuthToken,
required String phone,
required Map<String, dynamic> address,
bool consent = true,
}) async {
final gokwik = DioClient().getClient();
final endpoint =
'${cdnConfigInstance.getEndpoint(APIEndpointKeys.kfAddresses)!}/$addressId';
final response = await gokwik.put(
endpoint,
data: {'phone': phone, 'consent': consent, 'address': address},
options: Options(headers: {
APIHeader.muToken: userAuthToken,
}),
);
return response.data;
}