of static method

SheetController? of(
  1. BuildContext context
)

Inherit the SheetController from the closest SlidingSheet.

Every SlidingSheet has a SheetController, even if you didn't assign one explicitly. This allows you to call functions on the controller from child widgets without having to pass a SheetController around.

Implementation

static SheetController? of(BuildContext context) {
  return context.findAncestorStateOfType<_SlidingSheetState>()?.sheetController;
}