ResourceCode class
Enum representing different resource codes within the Tron protocol.
Each resource code has a unique value associated with it and a name for identification. The available resource codes are:
- Implemented types
Properties
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.
inherited
Static Methods
-
fromName(
String? name, {ResourceCode? orElse}) → ResourceCode? -
Returns the ResourceCode associated with the given
name
. -
fromValue(
int val) → ResourceCode - Returns the ResourceCode associated with the given value.
Constants
- bandWidth → const ResourceCode
- Represents bandwidth as a resource code.
- energy → const ResourceCode
- Represents energy as a resource code.
- tronPower → const ResourceCode
- Represents Tron Power as a resource code.
-
values
→ const List<
ResourceCode> - List of all available resource codes.