195 lines
6.6 KiB
Dart
195 lines
6.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class RegisterScreen extends StatefulWidget {
|
|
const RegisterScreen({super.key});
|
|
|
|
@override
|
|
State<RegisterScreen> createState() => _RegisterScreenState();
|
|
}
|
|
|
|
class _RegisterScreenState extends State<RegisterScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SingleChildScrollView(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(25),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(height: 75),
|
|
Text(
|
|
'Registration',
|
|
style: TextStyle(
|
|
fontSize: 30,
|
|
fontWeight: FontWeight.bold,
|
|
color: Theme.of(context).colorScheme.primary,
|
|
),
|
|
),
|
|
SizedBox(height: 5),
|
|
Text(
|
|
'Join Peak and start making fast payments',
|
|
style: TextStyle(fontSize: 18),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
SizedBox(height: 40),
|
|
// First Name Field
|
|
TextField(
|
|
decoration: InputDecoration(
|
|
labelText: 'First Name',
|
|
prefixIcon: Icon(Icons.person_outline),
|
|
),
|
|
),
|
|
SizedBox(height: 20),
|
|
// Last Name Field
|
|
TextField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Last Name',
|
|
prefixIcon: Icon(Icons.person_outline),
|
|
),
|
|
),
|
|
SizedBox(height: 20),
|
|
// Phone Field
|
|
TextField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Phone Number',
|
|
prefixIcon: Icon(Icons.phone_outlined),
|
|
),
|
|
keyboardType: TextInputType.phone,
|
|
),
|
|
SizedBox(height: 20),
|
|
// Email Field
|
|
TextField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Email Address',
|
|
prefixIcon: Icon(Icons.email_outlined),
|
|
),
|
|
keyboardType: TextInputType.emailAddress,
|
|
),
|
|
SizedBox(height: 20),
|
|
// Password Field
|
|
TextField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Password',
|
|
prefixIcon: Icon(Icons.lock_outline),
|
|
suffixIcon: Icon(Icons.visibility_outlined),
|
|
),
|
|
obscureText: true,
|
|
),
|
|
SizedBox(height: 40),
|
|
// Divider with "or" text
|
|
Row(
|
|
children: [
|
|
Expanded(child: Divider(color: Colors.grey.shade300)),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
|
child: Text(
|
|
'or continue with',
|
|
style: TextStyle(
|
|
color: Colors.grey.shade600,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
),
|
|
Expanded(child: Divider(color: Colors.grey.shade300)),
|
|
],
|
|
),
|
|
SizedBox(height: 30),
|
|
// Social Login Buttons
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: OutlinedButton.icon(
|
|
onPressed: () {
|
|
// TODO: Add Google login logic
|
|
},
|
|
icon: Image.asset(
|
|
'assets/google.png',
|
|
width: 20,
|
|
height: 20,
|
|
),
|
|
label: Text('Google', style: TextStyle(fontSize: 16)),
|
|
style: OutlinedButton.styleFrom(
|
|
padding: EdgeInsets.symmetric(vertical: 16),
|
|
side: BorderSide(color: Colors.grey.shade300),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 16),
|
|
Expanded(
|
|
child: OutlinedButton.icon(
|
|
onPressed: () {
|
|
// TODO: Add Apple login logic
|
|
},
|
|
icon: Image.asset(
|
|
'assets/apple.png',
|
|
width: 20,
|
|
height: 20,
|
|
),
|
|
label: Text('Apple', style: TextStyle(fontSize: 16)),
|
|
style: OutlinedButton.styleFrom(
|
|
padding: EdgeInsets.symmetric(vertical: 16),
|
|
side: BorderSide(color: Colors.grey.shade300),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 40),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
bottomNavigationBar: SizedBox(
|
|
height: 130,
|
|
child: Column(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 25),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
context.go('/onboarding/verify');
|
|
},
|
|
child: Text('Submit', style: TextStyle(fontSize: 16)),
|
|
),
|
|
),
|
|
SizedBox(width: 16),
|
|
Expanded(
|
|
child: TextButton(
|
|
onPressed: () {
|
|
context.go('/onboarding/login');
|
|
},
|
|
child: Text(
|
|
'Go to Login',
|
|
style: TextStyle(fontSize: 16),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 5),
|
|
TextButton(
|
|
onPressed: () {
|
|
context.go('/');
|
|
},
|
|
child: Text('Continue as guest?', style: TextStyle(fontSize: 14)),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|