getAddressLine2 method

String getAddressLine2()

Implementation

String getAddressLine2() {
  String addressLine2 = "";
  bool insertComma = false;
  if (state != null && state!.isNotEmpty) {
    addressLine2 += state!;
    insertComma = true;
  }

  if (postalCode != null && postalCode!.isNotEmpty) {
    if (insertComma) {
      addressLine2 += ", ";
    }
    addressLine2 += postalCode!;
    insertComma = true;
  }

  if (country != null && country!.isNotEmpty) {
    if (insertComma) {
      addressLine2 += ", ";
    }
    addressLine2 += country!;
    insertComma = true;
  }

  return addressLine2;
}