BridgedEnumValue class

Represents a specific value of a BridgedEnum. It holds the value's name, index, and the original native enum value.

Implemented types

Constructors

BridgedEnumValue(BridgedEnum enumType, String name, int index, Object nativeValue, {Map<String, BridgedInstanceGetterAdapter>? getters, Map<String, BridgedMethodAdapter>? methods})

Properties

enumType → BridgedEnum
The BridgedEnum definition this value belongs to.
final
hashCode → int
The hash code for this object.
no setteroverride
index → int
The index of the enum value in its definition order.
final
name → String
The name of the enum value (e.g., 'red' for Color.red).
final
nativeValue → Object
The original native Dart enum value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
valueType → RuntimeType
The runtime type of this value.
no setteroverride

Methods

get(String identifier) → Object?
Accesses a property or method of this value.
override
hasMethod(String method) → bool
Whether this enum value defines a bridged instance method (or operator) named method. Mirrors the lookup order used by invoke so callers (e.g. the interpreter's binary/unary operator dispatch) can probe for a bridged operator method — such as the &, |, ~ overloads on Flutter's WidgetState — before falling back to the built-in operator handling.
invoke(InterpreterVisitor visitor, String method, List<Object?> args, Map<String, Object?> namedArgs) → Object?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(String identifier, Object? value) → void
Sets a property of this value.
override
toString() → String
A string representation of this object.
override

Operators

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