DocumentView constructor
DocumentView({
- String? title,
- ObjectReference? reference,
- DocumentLoadStrategy loadStrategy = DocumentLoadStrategy.reference,
- List<
ContentItem> items = const [], - required QueryConfiguration? query,
- LayoutConfiguration<
ContentItem> ? layout, - List<
ContentModifierConfiguration> ? modifiers,
Implementation
DocumentView({
this.title,
this.reference,
this.loadStrategy = DocumentLoadStrategy.reference,
this.items = const [],
required this.query,
super.layout,
super.modifiers,
}) : super(schemaType: schemaName) {
if (loadStrategy == DocumentLoadStrategy.reference) {
assert(reference != null,
'A document-reference is required when the loadStrategy is set to "reference"');
}
if (loadStrategy == DocumentLoadStrategy.query) {
assert(query != null,
'A query-configuration is required when the loadStrategy is set to "query"');
}
assert(items.isNotEmpty, 'There has to be at least one section to render.');
}