wrap<T> static method

PackItem<T>? wrap<T>({
  1. required SetonixData pack,
  2. required String namespace,
  3. T? item,
  4. String? id,
})

Implementation

static PackItem<T>? wrap<T>(
    {required SetonixData pack,
    required String namespace,
    T? item,
    String? id}) {
  if (item == null || id == null) return null;
  return PackItem(
    pack: pack,
    location: ItemLocation(namespace, id),
    item: item,
  );
}