Added new config screen and buttons for navigation

This commit is contained in:
mitchell 2019-07-05 05:15:57 -04:00
parent d0505a4a58
commit af8834f7bd
8 changed files with 267 additions and 84 deletions

View file

@ -54,8 +54,18 @@ class Config implements ConfigRepo {
Future<ConnectionConfig> get connectionConfig async {
_checkIfPasswordMatched();
return ConnectionConfig.fromJson(
json.decode(await _storage.read(key: _keyConnectionConfig)));
final connConfig = await _storage.read(key: _keyConnectionConfig);
if (connConfig == null) {
return null;
}
return ConnectionConfig.fromJson(json.decode(connConfig));
}
Future<void> deleteAll() {
_checkIfPasswordMatched();
return _storage.deleteAll();
}
void _checkIfPasswordMatched() {