RestartNotifier constructor

RestartNotifier({
  1. required void onSetup(
    1. RestartNotifier notifier, {
    2. bool reset,
    }),
})

Creates a new restart notifier with the given setup callback.

The onSetup callback is called during initialization and each time the app is restarted. It receives the notifier instance and a boolean indicating whether this is a restart operation.

Implementation

RestartNotifier({required this.onSetup})
    : _state = const RestartState(Key('initial'));