setFirstRun method
- required bool value,
Persists the given value
to SharedPreferences as a boolean indicating
whether this is the first time the app has been run.
This function is intended to be called when the user has finished the onboarding process, and is used to determine whether the onboarding process should be shown or not.
Implementation
Future<void> setFirstRun({required final bool value}) async {
final sharedPreferences = await SharedPreferences.getInstance();
await sharedPreferences.setBool(firstRunKey, value);
}