FIX : Log in work again
continuous-integration/drone/push Build is passing Details

remotes/origin/mvc-implementation
Audric SABATIER 2 years ago
parent 91c417907a
commit 241b1ecc3d

@ -101,8 +101,14 @@ class Controller {
_dataBaseService.save(userToSave);
}
load(String username, String password) async {
//TODO : call database methode + create user
Future<bool> load(String username, String password) async {
User? newUser = await _dataBaseService.load(username, password);
if(newUser == null)
return false;
else
_currentUser = newUser;
return true;
}
changeUsername(String newName) {

@ -258,7 +258,7 @@ class _SignInPageState extends State<SignInPage> {
} else if (password == "") {
notify(4, context);
} else if(await MyApp.controller
.load(userNameTextField.text, passwordTextField.text) != null) {
.load(userNameTextField.text, passwordTextField.text)) {
Navigator.of(context).push(
PageTransition(
type: PageTransitionType.fade,

Loading…
Cancel
Save