UserDefaults class
Surface level API for the user defaults plugin.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
contains(
String key, String appGroup) → Future< bool> -
Returns
true
if the user defaults contains a value associated withkey
. -
get(
String key, [String? appGroup]) → Future< Object?> -
Returns the value associated with
key
ornull
if no value is associated withkey
. -
getBool(
String key, String appGroup) → Future< bool?> -
Returns the value associated with
key
ornull
if no value is associated withkey
. -
getDouble(
String key, String appGroup) → Future< double?> -
Returns the value associated with
key
ornull
if no value is associated withkey
. -
getInt(
String key, String appGroup) → Future< int?> -
Returns the value associated with
key
ornull
if no value is associated withkey
. -
getString(
String key, String appGroup) → Future< String?> -
Returns the value associated with
key
ornull
if no value is associated withkey
. -
remove(
String key, String appGroup) → Future< void> -
Removes the value associated with
key
from the user defaults -
set(
String key, dynamic value, String appGroup) → Future< void> -
Stores
value
in the user defaults key-value store. -
setBool(
String key, bool value, String appGroup) → Future< void> -
Stores
value
in the user defaults key-value store. -
setDouble(
String key, double value, String appGroup) → Future< void> -
Stores
value
in the user defaults key-value store. -
setInt(
String key, int value, String appGroup) → Future< void> -
Stores
value
in the user defaults key-value store. -
setString(
String key, String value, String appGroup) → Future< void> -
Stores
value
in the user defaults key-value store.