Open mayananand369 opened 3 weeks ago
I have a logout button in my app. After logging out, an exception is being thrown which says: A MapboxMap was used after being disposed. Once you have called dispose() on a MapboxMap, it can no longer be used.
Below are the relevant codes:
void _showLogoutConfirmationDialogUsing( BuildContext context, ) => ActionDialog.show( context, content: context.localize.areYouSureYouWantToLogout, onActionDismissed: () { Navigator.of( context, ).pop(); }, onActionConfirmed: () { Navigator.of( context, ).pop(); context.read<Web3AuthLogoutBloc>().add( const Web3AuthLogoutEvent.logout(), ); }, );
@override void dispose() { _mapboxMap?.dispose(); _clickedRestriction.dispose(); _centerLocationNotifier.dispose(); _mapStyleNotifier.dispose(); super.dispose(); }
https://github.com/user-attachments/assets/b79c8405-ffd2-4216-a27f-681de923c213
@mayananand369 could you put a breakpoint in MapboxMap.dispose(), is it called twice by any chance?
I have a logout button in my app. After logging out, an exception is being thrown which says: A MapboxMap was used after being disposed. Once you have called dispose() on a MapboxMap, it can no longer be used.
Below are the relevant codes:
https://github.com/user-attachments/assets/b79c8405-ffd2-4216-a27f-681de923c213