ParsedSystemInstructionPatterns extension

Adds pattern-matching-related methods to ParsedSystemInstruction.

on

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

A switch-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 of map that fallback to returning null.
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 of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null