store method

Future store()

stores the current user to the device

Implementation

Future store() async {
  await _storage.write(key: _username_store, value: name);
  await _storage.write(key: _userpass_store, value: pass);

  (await _prefs).setString(_full_name_store, full_name ?? 'noname');
  (await _prefs).setString(_full_surname_store, full_surname ?? 'noname');
  final prefs = await _prefs;
  if (defLoginId != null) {
    await prefs.setInt(_def_login_id_store, defLoginId!);
  } else {
    await prefs.remove(_def_login_id_store);
  }
}