set method

Future<bool> set(
  1. T value
)

Sets the value for this variable in persistent storage.

Uses the internal SharedPreferences instance to store the value. Returns true if the operation was successful, false otherwise.

Example:

final username = PrfString('username');
await username.set('Joey');

Implementation

Future<bool> set(T value) async {
  final prefs = await Prf.getInstance();
  return await setValue(prefs, value);
}