feat: Implement the home screen with new UI components and assets, and refine authentication screens and routing.
This commit is contained in:
@@ -16,7 +16,6 @@ class LoginScreen extends ConsumerStatefulWidget {
|
||||
}
|
||||
|
||||
class _LoginScreenState extends ConsumerState<LoginScreen> {
|
||||
final _nameController = TextEditingController();
|
||||
final _emailController = TextEditingController();
|
||||
final _passwordController = TextEditingController();
|
||||
String _selectedRole = 'USER';
|
||||
@@ -24,7 +23,6 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nameController.dispose();
|
||||
_emailController.dispose();
|
||||
_passwordController.dispose();
|
||||
super.dispose();
|
||||
@@ -63,6 +61,8 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
||||
final authState = ref.watch(authProvider);
|
||||
final isLoading = authState.status == AuthStatus.loading;
|
||||
|
||||
// Router redirect handles navigation on auth state change
|
||||
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
@@ -149,14 +149,6 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
|
||||
// Name field
|
||||
AuthTextField(
|
||||
hintText: 'Name',
|
||||
controller: _nameController,
|
||||
keyboardType: TextInputType.name,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Email field
|
||||
AuthTextField(
|
||||
hintText: 'Email',
|
||||
|
||||
@@ -81,7 +81,7 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
|
||||
child: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: authState.status == AuthStatus.success
|
||||
child: authState.status == AuthStatus.authenticated
|
||||
? _buildSuccessContent(authState)
|
||||
: _buildFormContent(authState),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user