SpUtil 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 Methods

clear() Future<bool>
clear.
getBool(String key, {bool defValue = false}) bool
get bool.
getDouble(String key, {double defValue = 0.0}) double
get double.
getDynamic(String key, {Object? defValue}) → dynamic
get dynamic.
getInstance() Future<SpUtil>
getInt(String key, {int defValue = 0}) int
get int.
getKeys() Set<String>
get keys.
getObject(String key) Map?
get object.
getObjectList(String key) List
get object list.
getString(String key, {String defValue = ''}) String
get string.
getStringList(String key, {List<String> defValue = const []}) List<String>
get string list.
haveKey(String key) bool
have key.
isInitialized() bool
Sp is initialized.
putBool(String key, bool value) Future<bool>
put bool.
putDouble(String key, double value) Future<bool>
put double.
putInt(String key, int value) Future<bool>
put int.
putObject(String key, Object? value) Future<bool>
put object.
putObjectList(String key, List<Object>? list) Future<bool>
put object list.
putString(String key, String value) Future<bool>
put string.
putStringList(String key, List<String> value) Future<bool>
put string list.
remove(String key) Future<bool>
remove.