SharedPreferencesUtil class

SharedPreferences工具类*

Constructors

SharedPreferencesUtil()

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

prefs ↔ SharedPreferences
getter/setter pair

Static Methods

getBool(String key, bool defaultValue) → bool
getDouble(String key, double defaultValue) → double
getInt(String key, int defaultValue) → int
getString(String key, String? defaultValue) → String?
getStringList(String key, List<String> defaultValue) → List<String>
init() → Future<void>
remove(String key) → dynamic
setBool(String key, bool value) → Future<void>
setDouble(String key, double value) → Future<void>
setInt(String key, int value) → Future<void>
setString(String key, String value) → Future<void>
setStringList(String key, List<String> value) → Future<void>

Constants

tag → const String