dvStudioComponent function
DVPageDocument
dvStudioComponent(
- String name, {
- required DVPageNode root,
- List<
DVStudioComponentProp> props = const <DVStudioComponentProp>[],
A component named name, drawn as root, taking props.
Implementation
DVPageDocument dvStudioComponent(
String name, {
required DVPageNode root,
List<DVStudioComponentProp> props = const <DVStudioComponentProp>[],
}) {
root.properties[_propsKey] = <Object?>[
for (final DVStudioComponentProp prop in props) prop.toJson(),
];
return DVPageDocument(
route: dvStudioComponentRoute(name),
title: name,
root: root,
);
}