SpUtils class

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 Properties

lock ↔ Lock
getter/setter pair
prefs ↔ SharedPreferences?
getter/setter pair

Static Methods

clear() → Future<bool>?
clear.
containsKey(String key) → bool?
contains Key.
getBool(String key, {bool? defValue = false}) → bool?
get bool.
getDouble(String key, {double? defValue = 0.0}) → double?
get double.
getInstance() → Future<SpUtils?>
getInt(String key, {int? defValue = 0}) → int?
get int.
getKeys() → Set<String>?
get keys.
getList(String key) → List?
getMap(String key) → Map<String, dynamic>?
getString(String key, {String? defValue = ''}) → String?
get string.
haveKey(String key) → bool?
have key.
isInitialized() → bool
Sp is initialized.
remove(String key) → Future<bool>?
remove.
setBool(String key, bool value) → Future<bool>?
put bool.
setDouble(String key, double value) → Future<bool>?
put double.
setInt(String key, int value) → Future<bool>?
put int.
setList(String key, List value) → Future<bool>?
setMap(String key, Object value) → Future<bool>?
setString(String key, String value) → Future<bool>?
put string.