of static method

ListCustomGroupedCheckboxState? of(
  1. BuildContext context, {
  2. bool nullOk = false,
})

Implementation

static ListCustomGroupedCheckboxState? of(BuildContext context,
    {bool nullOk = false}) {
  final ListCustomGroupedCheckboxState? result =
      context.findAncestorStateOfType<ListCustomGroupedCheckboxState>();
  if (nullOk || result != null) return result;
  throw FlutterError.fromParts(<DiagnosticsNode>[
    ErrorSummary(
        'ListGroupedCheckboxState.of() called with a context that does not contain an CustomGroupedCheckbox.'),
    ErrorDescription(
        'No ListGroupedCheckboxState ancestor could be found starting from the context that was passed to CustomGroupedCheckbox.of().'),
    context.describeElement('The context used was')
  ]);
}