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
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/foundation.dart';
import '../data/maps_repository.dart';
import '../data/models/place_model.dart';
@@ -62,10 +63,11 @@ class DestinationCubit extends Cubit<DestinationState> {
Future<void> _search(String query) async {
try {
final results = await _mapsRepo.autocomplete(query);
final results = await _mapsRepo.search(query);
emit(state.copyWith(results: results, searching: false));
} catch (e) {
emit(state.copyWith(searching: false, error: e.toString()));
emit(state.copyWith(
searching: false, error: e.toString(), clearError: false));
}
}
@@ -74,10 +76,27 @@ class DestinationCubit extends Cubit<DestinationState> {
if (query.trim().length < 2) return;
emit(state.copyWith(searching: true, clearError: true));
try {
final results = await _mapsRepo.autocomplete(query);
final results = await _mapsRepo.search(query);
emit(state.copyWith(results: results, searching: false));
} catch (e) {
emit(state.copyWith(searching: false, error: e.toString()));
} catch (e, st) {
debugPrint('Map Search Error: $e\n$st');
emit(state.copyWith(
searching: false, error: e.toString(), clearError: false));
}
}
Future<void> searchVoiceDirectly(String query,
{double? lat, double? lng}) async {
_debounce?.cancel();
if (query.trim().isEmpty) return;
emit(state.copyWith(searching: true, clearError: true));
try {
final results = await _mapsRepo.voiceSearch(query, lat: lat, lng: lng);
emit(state.copyWith(results: results, searching: false));
} catch (e, st) {
debugPrint('Map Voice Search Error: $e\n$st');
emit(state.copyWith(
searching: false, error: e.toString(), clearError: false));
}
}