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:

  • bandWidth: Represents bandwidth as a resource code.
  • energy: Represents energy as a resource code.
  • tronPower: Represents Tron Power as a resource code.
Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name associated with the resource code.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The unique value associated with each enumeration instance.
final

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.