flutter(rider): rebuild lib on Cubit/Bloc + Tripz backend (core + auth slice)
- keep store identity (com.mobileapp.store.ride, shorebird, firebase, fonts); old lib -> lib_old_getx - core: config/di/router(go_router)/theme/api_client(dio+tenant+bearer)/token_store(secure) - auth: repo + AuthCubit + OTP phone/otp screens; home: flutter_map (OSM placeholder, انطلق TODO) - android usesCleartextTraffic=true for http API; maps=flutter_map (no Google), state=Cubit Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user