get method

Future<T?> get()

Gets the stored value associated with this variable.

Uses the internal SharedPreferences instance to retrieve the value. Returns null if the value doesn't exist or can't be retrieved.

Example:

final username = PrfString('username');
final value = await username.get();

Implementation

Future<T?> get() async {
  final prefs = await Prf.getInstance();
  return await getValue(prefs);
}