StorageProvider class Null safety

Provides specific access to cache, using SharedPreferences.

To avoid typing errors when writing, obtaining or deleting values from persistent storage, this provider sets specific methods to manipulate each value.

Constructors

StorageProvider({required SharedPreferences prefs})

Properties

code → String
Returns the student code saved in storage if found, otherwise returns an empty string.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
token → String
Returns the token saved in storage if found, otherwise returns an empty string.
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeCode() → Future<void>
Removes the student code's value and key from storage.
removeToken() → Future<void>
Removes the token's value and key from storage.
setCode(String value) → Future<void>
Saves the given student code value in storage.
setToken(String password) → Future<void>
Saves the authentication access token in storage, given the password.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited