Return function instead of wrapping in annoymous callback

This commit is contained in:
istalri 2026-06-05 20:55:51 +02:00
commit 9ea6cd07a7

View file

@ -60,7 +60,7 @@ class LoginPage extends HookConsumerWidget {
appBar: Appbar(
leading: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () => Navigator.of(context).pop(),
onPressed: Navigator.of(context).pop,
),
),
body: AlertDialog(
@ -125,7 +125,7 @@ class LoginPage extends HookConsumerWidget {
),
actions: [
TextButton(
onPressed: hasError.value ? null : () => tryLogin(),
onPressed: hasError.value ? null : tryLogin,
child: Text("Sign In"),
),
],