resetSessionControl method
- WidgetRef ref
Reset session control settings
Implementation
void resetSessionControl(WidgetRef ref) {
// Reset the ask on exit setting.
ref.invalidate(askOnExitProvider);
// Save the ask on exit setting to shared_preferences.
saveAskOnExit(true);
// Reset the image viewer app setting.
ref.invalidate(imageViewerSettingProvider);
// Save the image viewer app setting to shared_preferences.
saveImageViewerApp(ref.read(imageViewerSettingProvider));
}