toInterface static method
convert a ProfileAddress to a ProfileAddressInterface
Implementation
static ProfileAddressInterface toInterface(
ProfileAddress profileAddress,
) {
final addressType = profileAddress.addressType;
return ProfileAddressInterface(
title: profileAddress.title,
isDefault: profileAddress.isDefault,
addressType: addressType != null
? ProfileAddressTypeConverter.toInterface(addressType)
: null,
streetAddress: profileAddress.streetAddress,
locality: profileAddress.locality,
region: profileAddress.region,
postalCode: profileAddress.postalCode,
country: profileAddress.country,
raw: profileAddress.raw,
deliveryNote: profileAddress.deliveryNote,
recipient: profileAddress.recipient,
company: profileAddress.company,
phoneNumber: profileAddress.phoneNumber,
);
}