addType<T> static method

void addType<T>([
  1. Function? factory
])

Registers an additional type T to be identifiable by the package.

Implementation

static void addType<T>([Function? factory]) {
  if (factory != null) {
    return TypePlus.addFactory(factory);
  }
  TypePlus.add<T>();
}