Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion example/lib/pages/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ class _CameraPageState extends ExamplePageState<CameraPage> {
@override
void dispose() {
if (_navigationRunning) {
GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
}
super.dispose();
}
Expand Down
6 changes: 5 additions & 1 deletion example/lib/pages/multiple_views.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ class _MultiplexState extends ExamplePageState<MultipleMapViewsPage> {

@override
void dispose() {
GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
clearRegisteredImages();
super.dispose();
}
Expand Down
12 changes: 10 additions & 2 deletions example/lib/pages/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ class _NavigationPageState extends ExamplePageState<NavigationPage> {
@override
void dispose() {
_clearListeners();
GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
clearRegisteredImages();
super.dispose();
}
Expand Down Expand Up @@ -623,7 +627,11 @@ class _NavigationPageState extends ExamplePageState<NavigationPage> {

// Cleanup navigation session.
// This will also clear destinations, stop simulation, stop guidance
await GoogleMapsNavigator.cleanup();
await GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
await _removeNewWaypointMarker();
await _removeDestinationWaypointMarkers();
_waypoints.clear();
Expand Down
6 changes: 5 additions & 1 deletion example/lib/pages/navigation_without_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ class _NavigationWithoutMapPageState
}

Future<void> cleanupNavigationSession() async {
await GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
setState(() {
routeCalculated = false;
guidanceRunning = false;
Expand Down
6 changes: 5 additions & 1 deletion example/lib/pages/turn_by_turn.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ class _TurnByTurnPageState extends ExamplePageState<TurnByTurnPage> {
void dispose() {
_clearListeners();
if (_navigationRunning) {
GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
}
super.dispose();
}
Expand Down
6 changes: 5 additions & 1 deletion example/lib/pages/widget_initialization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ class _ViewInitializationPageState
@override
void dispose() {
if (_navigationInitialized) {
GoogleMapsNavigator.cleanup();
GoogleMapsNavigator.cleanup().catchError((e) {
if (e is! SessionNotInitializedException) {
debugPrint('Navigator cleanup error: $e');
}
});
}
super.dispose();
}
Expand Down
Loading