of static method

Implementation

static DocumentViewBuilderState of(BuildContext context) {
  final state = context.findAncestorStateOfType<DocumentViewBuilderState>();
  if (state == null) {
    throw Exception('DocumentViewWidgetState not found in the widget tree');
  }

  return state;
}