EditSession<T> class
One in-flight cell edit.
Editing is a session rather than a callback so that a half-typed value can be validated, shown as an error, and either committed or rolled back without the underlying row ever holding an invalid value.
Constructors
-
EditSession({required CellAddress cell, required GridColumn<
T> column, required T row, required Object? initialValue})
Properties
- cell ↔ CellAddress
-
The cell being edited.
getter/setter pair
-
column
→ GridColumn<
T> -
final
- error → String?
-
Current validation message, if any.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDirty → bool
-
no setter
- isValid → bool
-
no setter
- originalValue → Object?
-
Value when the session opened, restored by cancel.
final
- row → T
-
The row being edited.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → Object?
-
The candidate value, as edited so far.
no setter
Methods
-
cancel(
) → EditResult< T> -
commit(
) → EditResult< T> - Validates and writes the value back through the column's setter.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
relocate(
int rowIndex) → void -
Points this session at
rowIndex, keeping its column and its half-typed value. Called when the edited row moves to a new position. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Object? value) → void - Updates the candidate value and re-runs validation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited