CellRestoration extension
Static factory access for RestorableCell.
The core cell package is Flutter-free, so the Flutter-dependent
RestorableCell type cannot live on Cell itself; this extension
provides the canonical spelling next to the core factories:
final counter = CellRestoration.restorableState<int>(
restorationId: 'counter',
initial: 0,
);
// Or, with the unqualified top-level alias:
final theme = restorableState<String>(restorationId: 'theme');
- on
Static Methods
-
restorableState<
V> ({required String restorationId, V? initial, V? fromPrimitives(Object? data)?, Object? toPrimitives(V? value)?}) → RestorableCell< V> -
Available on Cell, provided by the CellRestoration extension
Creates a RestorableCell with the givenrestorationIdandinitial.