postCode function

String postCode()

Return a random postal code.

Returns: The postal code randomly generated.

Implementation

String postCode() {
  final randomAddress = address();
  if (randomAddress.postalCode == null) {
    return postCode();
  }
  return randomAddress.postalCode!;
}