initialize static method
Initialize the data.
Please execute it when the application starts.
Implementation
static Future<void> initialize() async {
if (isInitialized) {
return;
}
_preferences = await SharedPreferences.getInstance();
}
Initialize the data.
Please execute it when the application starts.
static Future<void> initialize() async {
if (isInitialized) {
return;
}
_preferences = await SharedPreferences.getInstance();
}