init static method

Future<SharedPreferences?> init()

初始化,必须要初始化

Implementation

static Future<SharedPreferences?> init() async {
  if (ObjectUtils.isNull(_prefs)) {
    _prefs = await SharedPreferences.getInstance();
  }
  return _prefs;
}