ParsedSystemInstructionPatterns extension
Adds pattern-matching-related methods to ParsedSystemInstruction.
Methods
-
map<
TResult extends Object?> ({required TResult transfer(ParsedSystemTransferInstruction value), required TResult transferChecked(ParsedSystemTransferCheckedInstruction value), required TResult unsupported(ParsedSystemUnsupportedInstruction value)}) → TResult -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? transfer(ParsedSystemTransferInstruction value)?, TResult? transferChecked(ParsedSystemTransferCheckedInstruction value)?, TResult? unsupported(ParsedSystemUnsupportedInstruction value)?}) → TResult? -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult transfer(ParsedSystemTransferInstruction value)?, TResult transferChecked(ParsedSystemTransferCheckedInstruction value)?, TResult unsupported(ParsedSystemUnsupportedInstruction value)?, required TResult orElse()}) → TResult -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult transfer(ParsedSystemTransferInformation info, String type)?, TResult transferChecked(ParsedSystemTransferInformation info, String type)?, TResult unsupported(String type)?, required TResult orElse()}) → TResult -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> ({required TResult transfer(ParsedSystemTransferInformation info, String type), required TResult transferChecked(ParsedSystemTransferInformation info, String type), required TResult unsupported(String type)}) → TResult -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? transfer(ParsedSystemTransferInformation info, String type)?, TResult? transferChecked(ParsedSystemTransferInformation info, String type)?, TResult? unsupported(String type)?}) → TResult? -
Available on ParsedSystemInstruction, provided by the ParsedSystemInstructionPatterns extension
A variant ofwhenthat fallback to returningnull