Files
tripz-llc/apps/rider/lib/app_bindings.dart
T
HamzaandClaude Opus 4.8 6234e66471 feat: Gemini AI (doc OCR + face match) + role-assignment endpoints
- GeminiService (integrations/gemini, @Global): extractDocument (OCR fields) + faceMatch; graceful if no GEMINI_API_KEY
- documents: face-match now real via Gemini; POST /admin/documents/:id/ocr extracts fields for CS auto-fill
- roles: PATCH /admin/users/:id/role (admin) + POST /platform/users/role (bootstrap via x-platform-secret)
- config: gemini + platform.secret; .env.example entries

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 20:01:26 +03:00

40 lines
1.9 KiB
Dart

import 'package:get/get.dart';
import 'package:Tripz/controller/auth/login_controller.dart';
import 'package:Tripz/controller/firebase/firbase_messge.dart';
import 'package:Tripz/controller/firebase/local_notification.dart';
import 'package:Tripz/controller/home/deep_link_controller.dart';
import 'package:Tripz/controller/local/local_controller.dart';
/// This is the central dependency injection file for the app.
/// It uses GetX Bindings to make the app start faster and manage memory better.
class AppBindings extends Bindings {
@override
void dependencies() {
// --- [Type 1: Permanent Controllers] ---
// Use Get.put() for controllers that need to be available immediately and ALWAYS.
// They are created right away and never destroyed.
// LocaleController is needed instantly to set the app's theme and language.
Get.put(LocaleController());
// DeepLinkController must always be listening for incoming links.
// `permanent: true` ensures it survives `Get.offAll()`.
Get.put(DeepLinkController(), permanent: true);
// --- [Type 2: Lazy Loaded "Phoenix" Controllers] ---
// Use Get.lazyPut() for controllers that are heavy or not needed immediately.
// They are only created in memory the first time `Get.find()` is called.
// `fenix: true` is the key: it allows the controller to be "reborn" after being
// destroyed (e.g., by Get.offAll), preserving its state and functionality.
// LoginController is only needed during the login process on the splash screen.
Get.lazyPut(() => LoginController(), fenix: true);
// NotificationController is initialized on the splash screen, but might be needed later.
Get.lazyPut(() => NotificationController(), fenix: true);
// FirebaseMessagesController is also initialized on splash, but must persist its token and listeners.
Get.lazyPut(() => FirebaseMessagesController(), fenix: true);
}
}