of static method

Implementation

static NestedSideSheetState of(BuildContext context) {
  final state = context
      .dependOnInheritedWidgetOfExactType<InheritedSheetDataProvider>()
      ?.state;
  if (state != null) {
    return state;
  } else {
    throw Exception('Cannot find SideSheetHostState in the context.');
  }
}