buildPreview method
Widget
buildPreview({
- CheckboxProperties? properties,
- CheckboxNode? node,
- double? height,
- double? width,
- bool? value,
- ValueChanged<
bool?> ? onChanged, - WidgetBuildSettings settings = const WidgetBuildSettings(debugLabel: 'buildPreview'),
Implementation
Widget buildPreview({
CheckboxProperties? properties,
CheckboxNode? node,
double? height,
double? width,
bool? value,
ValueChanged<bool?>? onChanged,
WidgetBuildSettings settings =
const WidgetBuildSettings(debugLabel: 'buildPreview'),
}) {
final previewNode = CheckboxNode(
properties: properties ?? node?.properties ?? CheckboxProperties(),
id: '',
name: 'Checkbox',
basicBoxLocal: NodeBox(0, 0, width ?? 32, height ?? 32),
retainedOuterBoxLocal: NodeBox(0, 0, width ?? 32, height ?? 32),
);
previewNode.value = value;
return PassiveCheckboxWidget(
node: previewNode,
onChanged: (context, value) => onChanged?.call(value),
settings: settings,
);
}