fromJson static method

TimestampDataType 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 TimestampDataType fromJson(Map<String, dynamic> data) {
  if (data['type'] != 'timestamp') {
    throw Exception("Expected type 'float', got '${data['type']}'");
  }
  return TimestampDataType();
}