VyuhContentWidget<T extends ContentItem> constructor
const
VyuhContentWidget<T extends ContentItem> ({
- Key? key,
- String query = _defaultSanityQuery,
- required FromJsonConverter<
T> fromJson, - Map<
String, String> ? queryParams, - DocumentBuilder<
T> ? builder, - 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.',
);