of<T extends DataGridRow> static method

CellScope<T> of<T extends DataGridRow>(
  1. BuildContext context
)

Returns the nearest CellScope ancestor, throwing if none exists.

Implementation

static CellScope<T> of<T extends DataGridRow>(BuildContext context) {
  final scope = context.dependOnInheritedWidgetOfExactType<CellScope<T>>();
  assert(scope != null, 'No CellScope<$T> found in context');
  return scope!;
}