Fix register routing

This commit is contained in:
Moe Poi ~ 2022-05-12 18:12:03 +07:00
parent 56b3f6d077
commit 6eab74796b

View file

@ -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<LoginForm> {
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(