popSheet static method

void popSheet(
  1. BuildContext context
)

Pops the entire CupertinoSheetRoute, if a sheet route exists in the stack.

Used if to pop an entire sheet at once, if there is nested navigtion within that sheet.

Implementation

static void popSheet(BuildContext context) {
  if (hasParentSheet(context)) {
    Navigator.of(context, rootNavigator: true).pop();
  }
}