VyuhContentWidget<T extends ContentItem> constructor

const VyuhContentWidget<T extends ContentItem>({
  1. Key? key,
  2. String query = _defaultSanityQuery,
  3. required FromJsonConverter<T> fromJson,
  4. Map<String, String>? queryParams,
  5. DocumentBuilder<T>? builder,
  6. DocumentListBuilder<T>? listBuilder,
})

Creates a VyuhContentWidget with the given parameters.

Implementation

const VyuhContentWidget({
  super.key,
  this.query = _defaultSanityQuery,
  required this.fromJson,
  this.queryParams,
  this.builder,
  this.listBuilder,
}) : assert(
        (builder != null) ^ (listBuilder != null),
        'Provide either a builder for a single content item or a listBuilder for a list of content items, but not both.',
      );