maybeOf static method

The state from the closest instance of this class that encloses the given context.

This method is typically used by SliverKnownExtentsReorderableList item widgets that insert or remove items in response to user input.

If no SliverKnownExtentsReorderableList surrounds the context given, this function will return null.

See also:

Implementation

static SliverKnownExtentsReorderableListState? maybeOf(BuildContext context) {
  return context
      .findAncestorStateOfType<SliverKnownExtentsReorderableListState>();
}