PgStatePatterns extension
Adds pattern-matching-related methods to PgState.
- on
Methods
-
map<
TResult extends Object?> (TResult $default(_PgState value)) → TResult -
Available on PgState, provided by the PgStatePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PgState value)?) → TResult? -
Available on PgState, provided by the PgStatePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_PgState value)?, {required TResult orElse()}) → TResult -
Available on PgState, provided by the PgStatePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(PgRepo repo, PgStatus status, String error, PgLinkResponse? response, PgInvoiceResponse? pgInvoiceResponse, PgInvoiceResponse? pgInvoiceResponseError)?, {required TResult orElse()}) → TResult -
Available on PgState, provided by the PgStatePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(PgRepo repo, PgStatus status, String error, PgLinkResponse? response, PgInvoiceResponse? pgInvoiceResponse, PgInvoiceResponse? pgInvoiceResponseError)) → TResult -
Available on PgState, provided by the PgStatePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(PgRepo repo, PgStatus status, String error, PgLinkResponse? response, PgInvoiceResponse? pgInvoiceResponse, PgInvoiceResponse? pgInvoiceResponseError)?) → TResult? -
Available on PgState, provided by the PgStatePatterns extension
A variant ofwhenthat fallback to returningnull