SharedPreferencesAsync constructor
SharedPreferencesAsync({
- SharedPreferencesOptions options = const SharedPreferencesOptions(),
Creates a new instance with the given options
.
Implementation
SharedPreferencesAsync({
SharedPreferencesOptions options = const SharedPreferencesOptions(),
}) : _options = options {
if (SharedPreferencesAsyncPlatform.instance == null) {
throw StateError(
'The SharedPreferencesAsyncPlatform instance must be set.');
} else {
_platform = SharedPreferencesAsyncPlatform.instance!;
}
}