DataRequestLabel.parse constructor

DataRequestLabel.parse(
  1. String text
)

Implementation

factory DataRequestLabel.parse(String text) {
  final [...kindParts, label] = text.split('/');
  final [typeId, requestId] = label.split('@');
  final [type, ..._] = typeId.split('#');
  final id = typeId.detypify();
  return DataRequestLabel(kindParts.join('/'),
      type: type, id: id, requestId: requestId);
}