PPAddressPatterns extension

Adds pattern-matching-related methods to PPAddress.

on

Methods

map<TResult extends Object?>(TResult $default(_EPAddress value)) → TResult

Available on PPAddress, provided by the PPAddressPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_EPAddress value)?) → TResult?

Available on PPAddress, provided by the PPAddressPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_EPAddress value)?, {required TResult orElse()}) → TResult

Available on PPAddress, provided by the PPAddressPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(bool? isPrimary, String? fullAddress, String? addressId, String? line1, String? line2, String? city, String? state, String? postalCode, String? country, bool? isSelected)?, {required TResult orElse()}) → TResult

Available on PPAddress, provided by the PPAddressPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(bool? isPrimary, String? fullAddress, String? addressId, String? line1, String? line2, String? city, String? state, String? postalCode, String? country, bool? isSelected)) → TResult

Available on PPAddress, provided by the PPAddressPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(bool? isPrimary, String? fullAddress, String? addressId, String? line1, String? line2, String? city, String? state, String? postalCode, String? country, bool? isSelected)?) → TResult?

Available on PPAddress, provided by the PPAddressPatterns extension

A variant of when that fallback to returning null