feat: implement core architecture, design system, localization, and trip features for both driver and rider apps.
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../features/auth/cubit/auth_cubit.dart';
|
||||
import '../features/auth/cubit/auth_state.dart';
|
||||
import '../features/auth/view/phone_screen.dart';
|
||||
import '../features/auth/view/otp_screen.dart';
|
||||
import '../features/home/view/home_screen.dart';
|
||||
import '../features/trip/bloc/driver_trip_bloc.dart';
|
||||
import '../features/trip/view/driver_trip_screen.dart';
|
||||
import '../features/trip/view/driver_chat_screen.dart';
|
||||
import '../core/di.dart';
|
||||
|
||||
GoRouter buildRouter(AuthCubit auth) {
|
||||
return GoRouter(
|
||||
@@ -27,6 +32,20 @@ GoRouter buildRouter(AuthCubit auth) {
|
||||
GoRoute(path: '/phone', builder: (_, __) => const PhoneScreen()),
|
||||
GoRoute(path: '/otp', builder: (_, __) => const OtpScreen()),
|
||||
GoRoute(path: '/home', builder: (_, __) => const HomeScreen()),
|
||||
GoRoute(
|
||||
path: '/trip',
|
||||
builder: (_, __) => BlocProvider.value(
|
||||
value: getIt<DriverTripBloc>(),
|
||||
child: const DriverTripScreen(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/chat/:tripId',
|
||||
builder: (context, state) {
|
||||
final tripId = state.pathParameters['tripId']!;
|
||||
return DriverChatScreen(tripId: tripId);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user