feat(activities): add autocomplete & what's new popup
All checks were successful
Deploy TravelMate (Full Mobile) / deploy-android (push) Successful in 2m6s
Deploy TravelMate (Full Mobile) / deploy-ios (push) Successful in 4m3s

Features:
- Add autocomplete support for Activity search with Google Places API.
- Add "What's New" popup system to showcase new features on app update.
- Implement logic to detect fresh installs vs updates.

Fixes:
- Switch API key handling to use Firebase config for Release mode support.
- Refactor map pins to be consistent (red pins).
- UI fixes on Create Trip page (overflow issues).

Refactor:
- Make WhatsNewDialog reusable by accepting features list as parameter.
This commit is contained in:
Van Leemput Dayron
2026-01-13 17:36:51 +01:00
parent b511ec5df0
commit e665dea82a
6 changed files with 522 additions and 30 deletions

View File

@@ -14,6 +14,8 @@ import '../blocs/auth/auth_event.dart';
import '../services/error_service.dart';
import '../services/notification_service.dart';
import '../services/map_navigation_service.dart';
import '../services/whats_new_service.dart';
import '../components/whats_new_dialog.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@@ -57,6 +59,45 @@ class _HomePageState extends State<HomePage> {
});
}
});
// Vérifier les nouveautés
WidgetsBinding.instance.addPostFrameCallback((_) async {
await _checkAndShowWhatsNew();
});
}
Future<void> _checkAndShowWhatsNew() async {
final service = WhatsNewService();
if (await service.shouldShowWhatsNew()) {
if (!mounted) return;
showDialog(
context: context,
barrierDismissible: false,
builder: (context) => WhatsNewDialog(
onDismiss: () => Navigator.pop(context),
features: const [
WhatsNewItem(
icon: Icons.map_outlined,
title: 'Recherche globale',
description:
'Recherchez des restaurants, musées et plus encore directement depuis la carte.',
),
WhatsNewItem(
icon: Icons.search,
title: 'Autocomplétion améliorée',
description:
'Découvrez des suggestions intelligentes lors de la recherche de lieux et d\'activités.',
),
WhatsNewItem(
icon: Icons.warning_amber_rounded,
title: 'Alertes de distance',
description:
'Soyez averti si une activité est trop éloignée de votre lieu de séjour.',
),
],
),
);
}
}
Widget _buildPage(int index) {