DataFormat.fromString constructor

DataFormat.fromString(
  1. String type
)

Implementation

factory DataFormat.fromString(String type) {
  assert(type.contains('.'),
      "A data type must contain both a namespace and a name separated with a '.'");
  final String name = type.split('.').last;
  final String namespace = type.substring(0, type.indexOf(name) - 1);
  return DataFormat(namespace, name);
}