ensureSharedPrefIsInitialized method
Ensures that the SharedPreferences instance has been initialized.
This prevents reinitialization if the shared preferences are already initialized.
Implementation
Future<void> ensureSharedPrefIsInitialized() async {
if (!sharedPrefIsReady) {
await init();
}
}