2024-09-02 ほぼOK
This commit is contained in:
@ -52,6 +52,12 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// 追加
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
PermissionController.checkAndRequestPermissions();
|
||||
});
|
||||
|
||||
debugPrint('MapWidget: initState called');
|
||||
SettingsBinding().dependencies(); // これを追加
|
||||
_startIdleTimer();
|
||||
@ -84,6 +90,23 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
mapResetController.resetIdleTimer = _resetIdleTimer;
|
||||
Get.put(mapResetController);
|
||||
|
||||
// Add this debug subscription
|
||||
subscription = locationController.locationMarkerPositionStreamController.stream.listen(
|
||||
(LocationMarkerPosition? position) {
|
||||
if (position != null) {
|
||||
//debugPrint('Location update received: lat=${position.latitude}, lon=${position.longitude}');
|
||||
} else {
|
||||
debugPrint('Received null location update');
|
||||
}
|
||||
},
|
||||
onError: (error) {
|
||||
debugPrint('Error in location stream: $error');
|
||||
},
|
||||
onDone: () {
|
||||
debugPrint('Location stream closed');
|
||||
},
|
||||
);
|
||||
|
||||
// indexController.mapController = MapController(initCompleter: mapControllerCompleter);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user