ViewState class abstract

Base class for developer-extended ViewState.

ViewState holds transient UI state — dropdown visibility, active tabs, scroll offsets, form field values — that is not tied to domain data.

This file is scaffolded once by zfa build and then preserved. The generator will never overwrite an existing ViewState file.

// SCAFFOLDED — safe to edit, never regenerated
class ProductDetailViewState extends ViewState {
  ProductDetailViewState() : super();

  final isDescriptionExpanded = Signal<bool>(false);
  final activeTabIndex = Signal<int>(0);
  final scrollOffset = Signal<double>(0.0);
}

Constructors

ViewState()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isActive → bool
Whether any signals are still active.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Dispose all registered signals.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerSignal<T>(Signal<T> signal) → void
Register a signal so it can be disposed with the view state.
toString() → String
A string representation of this object.
override

Operators

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