fix phone dashboard
This commit is contained in:
@@ -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),
|
||||
),
|
||||
|
||||
@@ -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'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -34,7 +34,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const Text(
|
||||
'RentalDriveGo',
|
||||
'KriTomobil',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 28,
|
||||
|
||||
Reference in New Issue
Block a user