isNull method

Future<bool> isNull()

Checks if the current value is null in storage.

Returns true if the value doesn't exist or is explicitly set to null.

Example:

final username = PrfString('username');
if (await username.isNull()) {
  // Handle null case
}

Implementation

Future<bool> isNull() async {
  final prefs = await Prf.getInstance();
  return await isValueNull(prefs);
}