closeModal method

void closeModal(
  1. String modalId, {
  2. BuildContext? context,
})

Removes modalId from the modal query parameter, dropping the parameter entirely if it was the last one open.

Implementation

void closeModal(String modalId, {BuildContext? context}) {
  final router = context != null ? GoRouter.of(context) : _getRouter();
  NavigationUtils.closeModal(router, modalId);
}