Fix routing to login

This commit is contained in:
Moe Poi ~ 2022-05-10 08:27:12 +07:00
parent ff4940e78f
commit a1a90f58ea

View file

@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:nekoya_flutter/api/api.dart';
import 'package:nekoya_flutter/components/menu.dart';
import 'package:nekoya_flutter/components/register_error.dart';
import 'package:nekoya_flutter/components/register_verify.dart';
import 'package:nekoya_flutter/screens/login.dart';
class RegisterForm extends StatefulWidget {
const RegisterForm({Key? key}) : super(key: key);
@ -151,10 +151,9 @@ class RegisterFormState extends State<RegisterForm> {
fontSize: 15),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const Login()));
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: (context) => const Menu(initialScreen: 0))
);
},
),
],