UserResponsePatterns extension
Adds pattern-matching-related methods to UserResponse.
- on
Methods
-
map<
TResult extends Object?> (TResult $default(_UserResponse value)) → TResult -
Available on UserResponse, provided by the UserResponsePatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_UserResponse value)?) → TResult? -
Available on UserResponse, provided by the UserResponsePatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_UserResponse value)?, {required TResult orElse()}) → TResult -
Available on UserResponse, provided by the UserResponsePatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(UserProfile? profile, SupplierProfile? supplierProfile, Customer? customerProfile, CommunicationSettings? communicationSettings, AuthCredentialResponse? auth, )?, {required TResult orElse()}) → TResult -
Available on UserResponse, provided by the UserResponsePatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
when<
TResult extends Object?> (TResult $default(UserProfile? profile, SupplierProfile? supplierProfile, Customer? customerProfile, CommunicationSettings? communicationSettings, AuthCredentialResponse? auth, )) → TResult -
Available on UserResponse, provided by the UserResponsePatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(UserProfile? profile, SupplierProfile? supplierProfile, Customer? customerProfile, CommunicationSettings? communicationSettings, AuthCredentialResponse? auth, )?) → TResult? -
Available on UserResponse, provided by the UserResponsePatterns extension
A variant ofwhen
that fallback to returningnull