VariableInput.fromJson constructor

VariableInput.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory VariableInput.fromJson(Map<String, Object?> json) => VariableInput(
      requiredValue:
          json["required"] == null ? null : json["required"] as bool,
      defaultValue: json["default"],
      about: json["about"] == null ? null : json["about"] as String,
      items: json["items"] == null
          ? null
          : (json["items"] as List)
              .map(
                (item) => VariableItemInput.fromJson(
                  (item as Map).cast<String, Object?>(),
                ),
              )
              .toList(),
      name: json["name"] as String,
      type: VariableType.fromJson(json["type"]),
    );