USpaceApplyWritesWritesPatterns extension

Adds pattern-matching-related methods to USpaceApplyWritesWrites.

on

Methods

map<TResult extends Object?>({required TResult create(USpaceApplyWritesWritesCreate value), required TResult update(USpaceApplyWritesWritesUpdate value), required TResult delete(USpaceApplyWritesWritesDelete value), required TResult unknown(USpaceApplyWritesWritesUnknown value)}) → TResult

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? create(USpaceApplyWritesWritesCreate value)?, TResult? update(USpaceApplyWritesWritesUpdate value)?, TResult? delete(USpaceApplyWritesWritesDelete value)?, TResult? unknown(USpaceApplyWritesWritesUnknown value)?}) → TResult?

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult create(USpaceApplyWritesWritesCreate value)?, TResult update(USpaceApplyWritesWritesUpdate value)?, TResult delete(USpaceApplyWritesWritesDelete value)?, TResult unknown(USpaceApplyWritesWritesUnknown value)?, required TResult orElse()}) → TResult

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult create(Create data)?, TResult update(Update data)?, TResult delete(Delete data)?, TResult unknown(Map<String, dynamic> data)?, required TResult orElse()}) → TResult

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>({required TResult create(Create data), required TResult update(Update data), required TResult delete(Delete data), required TResult unknown(Map<String, dynamic> data)}) → TResult

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? create(Create data)?, TResult? update(Update data)?, TResult? delete(Delete data)?, TResult? unknown(Map<String, dynamic> data)?}) → TResult?

Available on USpaceApplyWritesWrites, provided by the USpaceApplyWritesWritesPatterns extension

A variant of when that fallback to returning null