updateLastVersion method
Sets the last know version and persists it. If called without parameter the currently running version is set.
Implementation
Future<bool> updateLastVersion([String? version]) async {
if (customVersionUpdate != null) {
return customVersionUpdate!(version);
}
version ??= await getCurrentVersion();
final prefs = await SharedPreferences.getInstance();
return prefs.setString(keyLastVersion, version);
}