resetDeveloperOptions function
- BuildContext context
Reset all developer option flags to their default values
Implementation
Future<void> resetDeveloperOptions(BuildContext context) async {
final container = ProviderScope.containerOf(context);
final developerOptions = <StateNotifierProvider<PreferenceNotifier, dynamic>>[
registerNotificationTokenEnabledFlag,
periodicRefreshIntervalPrefProvider,
showDebugOnRefreshFlag,
additionalResourcesEnabledFlag,
genAdditionInfoButtonEnabledFlag,
];
for (final developerOption in developerOptions) {
final notifier = container.read(developerOption.notifier);
await notifier.setValue(notifier.defaultValue);
}
}