toggleModals static method
Toggles each id in modalIds: closes it if open, opens it otherwise.
Implementation
static void toggleModals(GoRouter router, List<String> modalIds) {
final currentLocation = router.state.uri;
final newUri = toggleModalsInUri(currentLocation, modalIds);
if (newUri != currentLocation) {
router.go(newUri.toString(), extra: router.state.extra);
}
}