isPostalCodeValid method

bool isPostalCodeValid()

Checks whether or not the {@link #number} field is valid.

@return {@code true} if valid, {@code false} otherwise.

Implementation

bool isPostalCodeValid() {
  return (postalCode != null && postalCode!.isNotEmpty)
      ? int.tryParse(postalCode!) != null
      : false;
}