onBeforeRestore property

List<void Function()> onBeforeRestore
final

List of callbacks to be invoked before restore starts.

These callbacks are called in the order they were added, before any state restoration begins. Useful for preparing the app state or performing cleanup before restore.

Example:

StateSnapshot.onBeforeRestore.add(() {
  print('About to restore state');
});

Implementation

static final List<void Function()> onBeforeRestore = [];