withTestingFallback static method

Future<PrefsStorage> withTestingFallback()

Implementation

static Future<PrefsStorage> withTestingFallback() async {
  try {
    final result = SharedPrefsStorage();
    await result.sp;
    return result;
  } on MissingPluginException catch (_, __) {
    print('Using RamPrefsStorage instead of SharedPrefsStorage.');
    return RamPrefsStorage();
  }
}