Server selection and login are on different pages. #33

Manually merged
Henry-Hiles merged 8 commits from istalri/nexus:better-login into better-login 2026-06-05 16:44:35 -04:00
Showing only changes of commit 9ea6cd07a7 - Show all commits

Return function instead of wrapping in annoymous callback

istalri 2026-06-05 20:55:51 +02:00

View file

@ -60,7 +60,7 @@ class LoginPage extends HookConsumerWidget {
appBar: Appbar( appBar: Appbar(
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back), icon: Icon(Icons.arrow_back),
onPressed: () => Navigator.of(context).pop(), onPressed: Navigator.of(context).pop,
istalri marked this conversation as resolved Outdated
- onPressed: () => Navigator.pop(context),
+ onPressed: Navigator.of(context).pop,
```diff - onPressed: () => Navigator.pop(context), + onPressed: Navigator.of(context).pop, ```
istalri marked this conversation as resolved Outdated
- onPressed: () => Navigator.of(context).pop(),
+ onPressed: Navigator.of(context).pop,
```diff - onPressed: () => Navigator.of(context).pop(), + onPressed: Navigator.of(context).pop, ```
), ),
Henry-Hiles marked this conversation as resolved Outdated

bad formatting here. make sure you format your code :)

bad formatting here. make sure you format your code :)

Yeah I totally forgot. Autoformatting is good? like ctrl + shift + i?

Yeah I totally forgot. Autoformatting is good? like ctrl + shift + i?

Yeah, that should work great. I have it set to format on save.

Yeah, that should work great. I have it set to format on save.
), ),
istalri marked this conversation as resolved

prefer Navigator.of(context).pop()

prefer `Navigator.of(context).pop()`
body: AlertDialog( body: AlertDialog(
@ -125,7 +125,7 @@ class LoginPage extends HookConsumerWidget {
), ),
actions: [ actions: [
TextButton( TextButton(
onPressed: hasError.value ? null : () => tryLogin(), onPressed: hasError.value ? null : tryLogin,
child: Text("Sign In"), child: Text("Sign In"),
), ),
], ],