init static method

Future<void> init()

Initializes shared preferences instance.

Implementation

static Future<void> init() async {
  prefs = await SharedPreferences.getInstance();

  /// Reloads the shared preferences instance in the case modifications
  /// were made in the native code, after a notification action.
  fgbgSubscription =
      FGBGEvents.instance.stream.listen((event) => prefs.reload());
}