fromJson static method

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

Implementation

static TypedListValueType fromJson(Map<String, dynamic> json) {
  if (json
      case {
        'elementType': final Map<String, dynamic> elementTypeJson,
        'optional': final bool optional,
      }) {
    return TypedListValueType(
      ValueType.fromJson(elementTypeJson),
      optional: optional,
    );
  } else {
    throw FormatException('Invalid list value type data.', json);
  }
}