onSetup property
Callback function called during initialization and restart.
This function is invoked:
- During initial setup (with
reset: false) - During restart operations (with
reset: true)
Use this callback to initialize app state, clear caches, reset preferences, or perform any other setup/cleanup operations.
Implementation
final void Function(RestartNotifier notifier, {bool reset}) onSetup;