ItemLocation.fromString constructor

ItemLocation.fromString(
  1. String location, [
  2. String? namespace
])

Implementation

factory ItemLocation.fromString(String location, [String? namespace]) {
  namespace ??= kCorePackId;
  final splitted = location.split(':');
  if (splitted.length < 2) {
    return ItemLocation(namespace, splitted[0]);
  }
  return ItemLocation(splitted[0], splitted[1]);
}