fromJson static method

IntDataType fromJson(
  1. Map<String, dynamic> data
)
override

Factory method: parse a JSON representation into a concrete DataType. Looks up the correct subclass in _dataTypes.

Implementation

static IntDataType fromJson(Map<String, dynamic> data) {
  if (data['type'] != 'int') {
    throw Exception("Expected type 'int', got '${data['type']}'");
  }
  return IntDataType();
}