We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f409c5f commit dcd2ae2Copy full SHA for dcd2ae2
1 file changed
lib/parking_map_screen.dart
@@ -73,15 +73,18 @@ class _ParkingMapScreenState extends State<ParkingMapScreen> {
73
debugPrint("Error getting current position: $e");
74
}
75
76
- _positionStreamSubscription = Geolocator.getPositionStream().listen((
77
- position,
78
- ) {
79
- if (mounted) {
80
- setState(() {
81
- _currentPosition = position;
82
- });
83
- }
84
+ _positionStreamSubscription = Geolocator.getPositionStream().listen(
+ (position) {
+ if (mounted) {
+ setState(() {
+ _currentPosition = position;
+ });
+ }
+ },
+ onError: (e) {
85
+ debugPrint("Error receiving location update: $e");
86
87
+ );
88
89
90
void _centerOnUser() {
0 commit comments