ParsedInstruction class sealed

An instruction which is part of a ParsedMessage.

Implemented types
Available extensions
Annotations
  • @Freezed.new(unionKey: 'program', fallbackUnion: 'unsupported')

Constructors

ParsedInstruction.fromJson(Map<String, dynamic> json)
factory
ParsedInstruction.memo({@JsonKey.new(name: 'parsed') required String? memo})
Instruction representing a memo with content memo
const
factory
ParsedInstruction.splToken({required ParsedSplTokenInstruction parsed})
const
factory
ParsedInstruction.system({required String programId, required ParsedSystemInstruction parsed})
const
factory
ParsedInstruction.unsupported({String? program})
Any instruction that we are not currently supporting.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult system(ParsedInstructionSystem value), required TResult splToken(ParsedInstructionSplToken value), required TResult memo(ParsedInstructionMemo value), required TResult unsupported(ParsedInstructionUnsupported value)}) → TResult

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? system(ParsedInstructionSystem value)?, TResult? splToken(ParsedInstructionSplToken value)?, TResult? memo(ParsedInstructionMemo value)?, TResult? unsupported(ParsedInstructionUnsupported value)?}) → TResult?

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult system(ParsedInstructionSystem value)?, TResult splToken(ParsedInstructionSplToken value)?, TResult memo(ParsedInstructionMemo value)?, TResult unsupported(ParsedInstructionUnsupported value)?, required TResult orElse()}) → TResult

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult system(String programId, ParsedSystemInstruction parsed)?, TResult splToken(ParsedSplTokenInstruction parsed)?, TResult memo(String? memo)?, TResult unsupported(String? program)?, required TResult orElse()}) → TResult

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ParsedInstruction to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult system(String programId, ParsedSystemInstruction parsed), required TResult splToken(ParsedSplTokenInstruction parsed), required TResult memo(String? memo), required TResult unsupported(String? program)}) → TResult

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? system(String programId, ParsedSystemInstruction parsed)?, TResult? splToken(ParsedSplTokenInstruction parsed)?, TResult? memo(String? memo)?, TResult? unsupported(String? program)?}) → TResult?

Available on ParsedInstruction, provided by the ParsedInstructionPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited