hasState method

Future<bool> hasState()

Checks if either the value or timestamp exists in SharedPreferences.

Returns true if any state is present, otherwise false.

Implementation

Future<bool> hasState() async {
  final results = await Future.wait([
    value.existsOnPrefs(),
    lastUpdate.existsOnPrefs(),
  ]);
  return results.any((e) => e);
}