instance static method

Future<void> instance()

Initializes the SharedPreferences instance.

Must be called once before accessing any other methods, typically in main() before runApp().

Implementation

static Future<void> instance() async {
  _instance = await SharedPreferences.getInstance();
}