kelola penyewa dan beberapa error fix
This commit is contained in:
@ -5,7 +5,15 @@ import '../modules/warga/controllers/warga_dashboard_controller.dart';
|
||||
class WargaBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut<AuthProvider>(() => AuthProvider());
|
||||
Get.lazyPut<WargaDashboardController>(() => WargaDashboardController());
|
||||
// Pastikan AuthProvider teregistrasi
|
||||
if (!Get.isRegistered<AuthProvider>()) {
|
||||
Get.put(AuthProvider());
|
||||
}
|
||||
|
||||
// Gunakan lazyPut untuk memastikan controller hanya diinisialisasi saat dibutuhkan
|
||||
Get.lazyPut<WargaDashboardController>(
|
||||
() => WargaDashboardController(),
|
||||
fenix: true, // Akan dibuat ulang jika dihapus
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user