FormKey<T> class

A key that uniquely identifies a form field and its type.

FormKey extends LocalKey and is used throughout the form system to reference specific form fields. It includes type information to ensure type-safe access to form values.

Example:

const emailKey = FormKey<String>('email');
const ageKey = FormKey<int>('age');
Inheritance
Implementers

Constructors

FormKey(Object key)
Creates a FormKey with the specified key object.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
key Object
The underlying key object.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Type
Gets the generic type parameter of this key.
no setter

Methods

getValue(FormMapValues values) → T?
Gets the value associated with this key from the form values map.
isInstanceOf(dynamic value) bool
Checks if a dynamic value is an instance of this key's type.
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
operator [](FormMapValues values) → T?
Operator overload to get the value from form values (same as getValue).