setShippingAddress static method

Future<void> setShippingAddress(
  1. String firstName,
  2. String lastName,
  3. String phoneNumber,
  4. String addressLine1,
  5. String addressLine2,
  6. String country,
  7. String region,
  8. String city,
)

Implementation

static Future<void> setShippingAddress(
    String firstName,
    String lastName,
    String phoneNumber,
    String addressLine1,
    String addressLine2,
    String country,
    String region,
    String city) async {
  try {
    await platform.invokeMethod('setShippingAddress', <String, String>{
      'firstName': firstName,
      'lastName': lastName,
      'phoneNumber': phoneNumber,
      'addressLine1': addressLine1,
      'addressLine2': addressLine2,
      'country': country,
      'region': region,
      'city': city,
    });
  } on PlatformException catch (e) {
    showToast(e.message.toString());
  }
}