export method

  1. @override
Map<String, dynamic> export(
  1. Widget? widget,
  2. BuildContext? buildContext
)
override

export the runtime widget to json

Implementation

@override
Map<String, dynamic> export(Widget? widget, BuildContext? buildContext) {
  var realWidget = widget as Placeholder;
  return <String, dynamic>{
    "type": widgetName,
    "color": realWidget.color != null
        ? realWidget.color.value.toRadixString(16)
        : "0xFF455A64",
    "strokeWidth": realWidget.strokeWidth,
    "fallbackWidth": realWidget.fallbackWidth,
    "fallbackHeight": realWidget.fallbackHeight
  };
}