Root.fromJson constructor

Root.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Root.fromJson(Map<String, dynamic> json) => Root(
      id: json["id"],
      type: json["type"],
      appComponentIds: json["app_component_ids"] == null
          ? null
          : List<String>.from(
              json["app_component_ids"].map((x) => x),
            ),
      name: json["name"],
      uiTrigger: json["ui_trigger"] == null
          ? null
          : UITrigger.fromJson(json["ui_trigger"]),
      widgets: List<UIComponent>.from(
        json["widgets"].map(
          (x) => UIComponent.fromJson(x),
        ),
      ),
      props: json["props"] == null ? null : RootProps.fromJson(json["props"]),
    );