initialize static method

Future<void> initialize()

Initialize the data.

Please execute it when the application starts.

Implementation

static Future<void> initialize() async {
  if (isInitialized) {
    return;
  }
  _preferences = await SharedPreferences.getInstance();
}