fix phone dashboard

This commit is contained in:
root
2026-05-27 03:11:45 -04:00
parent 7ca43ba2f3
commit 1112b04516
48 changed files with 1222 additions and 368 deletions
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:dio/dio.dart';
import 'package:go_router/go_router.dart';
import '../../../core/providers/auth_provider.dart';
class EmployeeLoginScreen extends ConsumerStatefulWidget {
@@ -37,6 +38,9 @@ class _EmployeeLoginScreenState extends ConsumerState<EmployeeLoginScreen> {
_emailController.text.trim(),
_passwordController.text,
);
if (mounted) {
context.go('/dashboard');
}
} on DioException catch (e) {
setState(() {
_error = _messageForDioError(e);
@@ -60,6 +60,7 @@ class LandingScreen extends StatelessWidget {
width: double.infinity,
child: ElevatedButton(
onPressed: () => context.go('/client'),
//onPressed: () => context.push('/client'),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFFF6B00),
foregroundColor: Colors.white,
@@ -86,7 +87,7 @@ class LandingScreen extends StatelessWidget {
),
const SizedBox(height: 16),
TextButton(
onPressed: () => context.go('/agency'),
onPressed: () => context.push('/login/employee'),
style: TextButton.styleFrom(
foregroundColor: Colors.white.withValues(alpha: 0.5),
),
+4 -2
View File
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../../widgets/app_back_button.dart';
class RoleScreen extends StatelessWidget {
const RoleScreen({super.key});
@@ -13,7 +14,8 @@ class RoleScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 40),
const AppBackButton(fallbackRoute: '/landing'),
const SizedBox(height: 24),
Container(
width: 60,
height: 60,
@@ -53,7 +55,7 @@ class RoleScreen extends StatelessWidget {
title: 'Browse & Reserve',
subtitle: 'Find and book a vehicle',
color: const Color(0xFF0E9F6E),
onTap: () => context.go('/client'),
onTap: () => context.push('/client'),
),
],
),
+1 -1
View File
@@ -34,7 +34,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> {
),
const SizedBox(height: 20),
const Text(
'RentalDriveGo',
'KriTomobil',
style: TextStyle(
color: Colors.white,
fontSize: 28,