saveLastAlerted method

Future<bool> saveLastAlerted()

Implementation

Future<bool> saveLastAlerted() async {
  var prefs = await SharedPreferences.getInstance();
  _lastTimeAlerted = DateTime.now();
  await prefs.setString('lastTimeAlerted', _lastTimeAlerted.toString());

  _lastVersionAlerted = _appStoreVersion;
  await prefs.setString('lastVersionAlerted', _lastVersionAlerted ?? '');

  _hasAlerted = true;
  return true;
}