From 6ef562c062adccf9c6c14d2bcfc00924ccec3773 Mon Sep 17 00:00:00 2001 From: Matthew Patrick Date: Fri, 29 Apr 2022 04:36:55 +0700 Subject: [PATCH] register_form - Linked text to Login page --- lib/components/register_form.dart | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/components/register_form.dart b/lib/components/register_form.dart index 2b85174..c93028b 100644 --- a/lib/components/register_form.dart +++ b/lib/components/register_form.dart @@ -4,6 +4,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:nekoya_flutter/api/api.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); @@ -131,14 +132,25 @@ class RegisterFormState extends State { ), Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Text( - "Already have an account?? \nClick here to Sign In !!", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15), + children: [ + TextButton( + style: TextButton.styleFrom( + primary: Colors.transparent, + ), + child: const Text( + "Already have an account?? \nClick here to Sign In !!", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15), + ), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const Login())); + }, ), ], )