export method
export the runtime widget to json
Implementation
@override
Map<String, dynamic> export(Widget? widget, BuildContext? buildContext) {
var realWidget = widget as Container;
var padding = realWidget.padding as EdgeInsets?;
var margin = realWidget.margin as EdgeInsets?;
var constraints = realWidget.constraints;
return <String, dynamic>{
"type": widgetName,
"alignment": realWidget.alignment != null
? exportAlignment(realWidget.alignment as Alignment?)
: null,
"padding": padding != null
? "${padding.left},${padding.top},${padding.right},${padding.bottom}"
: null,
"color": realWidget.color != null
? realWidget.color!.value.toRadixString(16)
: null,
"margin": margin != null
? "${margin.left},${margin.top},${margin.right},${margin.bottom}"
: null,
"constraints":
constraints != null ? exportConstraints(constraints) : null,
"child": DynamicWidgetBuilder.export(realWidget.child, buildContext)
};
}