CommandResult<TParam, TResult> class

Combined execution state of a Command represented using four of its fields. A CommandResult will be issued for any state change of any of its fields During normal command execution you will get this items by listening at the command's .results ValueListenable.

  1. If the command was just newly created you will get param data, null, null, false (paramData, data, error, isExecuting)
  2. When calling execute: param data, null, null, true
  3. When execution finishes: param data, the result, null, false param data is the data that you pass as parameter when calling the command
Available Extensions

Constructors

CommandResult(TParam? paramData, TResult? data, Object? error, bool isExecuting)
const
CommandResult.blank()
const
CommandResult.data(TParam? param, TResult data)
const
CommandResult.error(TParam? param, dynamic error)
const
CommandResult.isLoading([TParam? param])
const

Properties

data → TResult?
final
error Object?
final
hasData bool
no setter
hasError bool
no setter
hashCode int
The hash code for this object.
no setteroverride
isExecuting bool
final
paramData → TParam?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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