of static method

_ResponsiveScaffoldState of(
  1. BuildContext context
)

Static method to access the state of the nearest ResponsiveScaffold ancestor in the widget tree.

Implementation

static _ResponsiveScaffoldState of(BuildContext context) {
  final _ResponsiveScaffoldState? result = context.findAncestorStateOfType<_ResponsiveScaffoldState>();
  if (result == null) throw Exception('Context not found');
  return result;
}