From 6eab74796b07f619a198d5263d22e2b8ad73ea28 Mon Sep 17 00:00:00 2001 From: Moe Date: Thu, 12 May 2022 18:12:03 +0700 Subject: [PATCH] Fix register routing --- lib/components/login_form.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/components/login_form.dart b/lib/components/login_form.dart index 525c953..25d16a3 100644 --- a/lib/components/login_form.dart +++ b/lib/components/login_form.dart @@ -5,6 +5,7 @@ import 'package:nekoya_flutter/api/api.dart'; import 'package:nekoya_flutter/components/login_error.dart'; import 'package:nekoya_flutter/components/menu.dart'; import 'package:nekoya_flutter/data/auth.dart'; +import 'package:nekoya_flutter/screens/register.dart'; import 'package:nekoya_flutter/utils/utils.dart'; class LoginForm extends StatefulWidget { @@ -193,8 +194,8 @@ class LoginFormState extends State { Widget _buildSignupBtn() { return GestureDetector( onTap: () { - Navigator.of(context).pushReplacement(MaterialPageRoute( - builder: (context) => const Menu(initialScreen: 1))); + Navigator.pop(context); + Navigator.push(context, MaterialPageRoute(builder: (context) => const Register())); }, child: RichText( text: const TextSpan(