feat: implement splash and onboarding flows, update app assets, and add project design documentation

This commit is contained in:
Hamza-Ayed
2026-07-24 04:15:07 +03:00
parent 9f7bc31408
commit 213b459912
208 changed files with 23801 additions and 1066 deletions
@@ -5,6 +5,7 @@ import '../../../core/l10n/app_localizations.dart';
import 'package:go_router/go_router.dart';
import 'package:intaleq_maps/intaleq_maps.dart';
import '../../../core/design/tokens.dart';
import '../../../core/ui/tripz_scaffold.dart';
import '../bloc/trip_bloc.dart';
import '../bloc/trip_state.dart';
import '../bloc/trip_event.dart';
@@ -20,7 +21,6 @@ class TripTrackingScreen extends StatefulWidget {
}
class _TripTrackingScreenState extends State<TripTrackingScreen> {
IntaleqMapController? _mapController;
Timer? _cameraFollowTimer;
@override
@@ -39,7 +39,6 @@ class _TripTrackingScreenState extends State<TripTrackingScreen> {
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context)!;
final cs = Theme.of(context).colorScheme;
return BlocConsumer<TripBloc, TripState>(
listenWhen: (prev, cur) => prev.trip?.status != cur.trip?.status,
@@ -52,7 +51,23 @@ class _TripTrackingScreenState extends State<TripTrackingScreen> {
builder: (context, state) {
final trip = state.trip;
if (trip == null) {
return const Scaffold(body: Center(child: CircularProgressIndicator()));
return TripzScaffold(
showBackButton: true,
onBack: () {
context.read<TripBloc>().add(const TripClear());
context.go('/home');
},
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const CircularProgressIndicator(),
const SizedBox(height: T.s16),
Text(l10n.loading),
],
),
),
);
}
final pickup = LatLng(trip.pickupLat, trip.pickupLng);
@@ -71,10 +86,14 @@ class _TripTrackingScreenState extends State<TripTrackingScreen> {
target: driverPos ?? pickup,
zoom: 15,
),
myLocationEnabled: false,
mapType: Theme.of(context).brightness == Brightness.dark
? IntaleqMapType.normal
: IntaleqMapType.light,
myLocationEnabled: true,
myLocationButtonEnabled: false,
zoomControlsEnabled: false,
compassEnabled: false,
onMapCreated: (c) => _mapController = c,
onMapCreated: (_) {},
markers: _buildMarkers(pickup, dropoff, driverPos),
),
@@ -106,7 +125,9 @@ class _TripTrackingScreenState extends State<TripTrackingScreen> {
// TODO: Chat — Phase 3
},
onCancel: state.canCancel
? () => context.read<TripBloc>().add(const TripCancelRequested())
? () => context
.read<TripBloc>()
.add(const TripCancelRequested())
: null,
),
),
@@ -166,8 +187,9 @@ class _SearchingBodyState extends State<_SearchingBody>
@override
void initState() {
super.initState();
_pulse = AnimationController(vsync: this, duration: const Duration(seconds: 2))
..repeat(reverse: true);
_pulse =
AnimationController(vsync: this, duration: const Duration(seconds: 2))
..repeat(reverse: true);
_scale = Tween<double>(begin: 0.8, end: 1.2).animate(
CurvedAnimation(parent: _pulse, curve: Curves.easeInOut),
);
@@ -213,14 +235,20 @@ class _SearchingBodyState extends State<_SearchingBody>
),
const SizedBox(height: T.s16),
Text(l10n.searchingDriver,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600),
style: Theme.of(context)
.textTheme
.titleMedium
?.copyWith(fontWeight: FontWeight.w600),
textAlign: TextAlign.center),
const SizedBox(height: T.s20),
SizedBox(
width: double.infinity,
child: OutlinedButton(
onPressed: () => context.read<TripBloc>().add(const TripCancelRequested()),
style: OutlinedButton.styleFrom(foregroundColor: cs.error, side: BorderSide(color: cs.error)),
onPressed: () =>
context.read<TripBloc>().add(const TripCancelRequested()),
style: OutlinedButton.styleFrom(
foregroundColor: cs.error,
side: BorderSide(color: cs.error)),
child: Text(l10n.cancelSearch),
),
),