20 lines
636 B
Dart
20 lines
636 B
Dart
import 'package:get/get.dart';
|
|
import '../controllers/geolocation_controller.dart';
|
|
|
|
/// GetX Binding für Geolocation Dependencies
|
|
class GeolocationBinding extends Bindings {
|
|
@override
|
|
void dependencies() {
|
|
// Lazy Loading - Controller wird erst erstellt wenn benötigt
|
|
Get.lazyPut<GeolocationController>(() => GeolocationController());
|
|
}
|
|
}
|
|
|
|
/// Alternative: Permanent Binding für App-weite Nutzung
|
|
class GeolocationPermanentBinding extends Bindings {
|
|
@override
|
|
void dependencies() {
|
|
// Permanent - Controller bleibt im Speicher
|
|
Get.put<GeolocationController>(GeolocationController(), permanent: true);
|
|
}
|
|
} |