TokenWalletState class
State of GenericTokenWallet that allows tracking when subscription was created successfully or when it failed with some error.
To detect which state is active, use hasWallet and hasError.
- Annotations
Constructors
- TokenWalletState.error({required Object err, required Address owner, required Address rootTokenContract})
-
Create state with error.
const
- TokenWalletState.wallet(GenericTokenWallet w)
- Create state with wallet
Properties
- error → Object?
-
Any error that could be thrown during creating subscription.
final
- hasError → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasWallet → bool
-
no setter
- owner → Address
-
Allows to track for which wallet this state was created.
This can be useful when wallet is null and we cannot detect it.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- rootTokenContract → Address
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - wallet → GenericTokenWallet?
-
Wallet that could be created.
If wallet was created, then hasWallet returns true and you can use it
as usual.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited