getSavedPrefs method

Future<bool> getSavedPrefs()

Implementation

Future<bool> getSavedPrefs() async {
  var prefs = await SharedPreferences.getInstance();
  final lastTimeAlerted = prefs.getString('lastTimeAlerted');
  if (lastTimeAlerted != null) {
    _lastTimeAlerted = DateTime.parse(lastTimeAlerted);
  }

  _lastVersionAlerted = prefs.getString('lastVersionAlerted');

  _userIgnoredVersion = prefs.getString('userIgnoredVersion');

  return true;
}