manualFromJson method

CNode manualFromJson(
  1. String widgetType,
  2. Map<String, dynamic> json,
  3. DynamicAttributes parser,
  4. ActionMapper actionMapper,
)

Implementation

CNode manualFromJson(final String widgetType, final Map<String, dynamic> json,
    DynamicAttributes parser, ActionMapper actionMapper) {
  switch (widgetType) {
    case NType.align:
      return AlignOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.column:
      return ColumnOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.component:
      return ComponentOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.teamComponent:
      return TeamComponentOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.container:
      return ContainerOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.image:
      return ImageOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.icon:
      return IconOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.listView:
      return ListViewOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.lottie:
      return LottieOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.scaffold:
      return ScaffoldOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.text:
      return TextOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.spacer:
      return SpacerOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.svgPicture:
      return SvgPictureOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.textField:
      return TextFieldOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.switcH:
      return SwitchOpenNode.fromJson(widgetType, json, parser, actionMapper);
    case NType.pageView:
      return PageViewOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.condition:
      return ConditionOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    case NType.dropDown:
      return DropDownOpenNode.fromJson(
          widgetType, json, parser, actionMapper);
    default:
      throw Exception('Unknown widgetType: $widgetType');
  }
}