create static method
Future<SharedPreferencesWithCache>
create({
- required SharedPreferencesWithCacheOptions cacheOptions,
- Map<
String, Object?> ? cache,
Creates a new instance with the given options and reloads the cache from the platform data.
Implementation
static Future<SharedPreferencesWithCache> create({
SharedPreferencesOptions sharedPreferencesOptions =
const SharedPreferencesOptions(),
required SharedPreferencesWithCacheOptions cacheOptions,
Map<String, Object?>? cache,
}) async {
final SharedPreferencesWithCache preferences =
SharedPreferencesWithCache._create(
sharedPreferencesOptions: sharedPreferencesOptions,
cacheOptions: cacheOptions,
cache: cache,
);
await preferences.reloadCache();
return preferences;
}