Added: signup screen, routing logic for login,signup

This commit is contained in:
2025-06-03 12:23:30 +02:00
parent 084d4b7a17
commit 2a5782b297
3 changed files with 195 additions and 30 deletions

View File

@@ -1,6 +1,10 @@
import 'package:flutter/material.dart';
import 'signup.dart';
class LoginScreen extends StatefulWidget {
final VoidCallback onSwitchToSignup;
const LoginScreen({required this.onSwitchToSignup, super.key});
@override
State<LoginScreen> createState() => _LoginScreenState();
}
@@ -25,7 +29,7 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('User Login')),
//appBar: AppBar(title: Text('User Login')),
body: Padding(
padding: const EdgeInsets.all(24.0),
child: Form(
@@ -87,6 +91,11 @@ class _LoginScreenState extends State<LoginScreen> {
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 12),
),
),
const SizedBox(height: 12),
TextButton(
onPressed: widget.onSwitchToSignup,
child: Text("Don't have an account? Sign up"),
),
],
),
),