create<T> static method

void create<T>(
  1. InstanceBuilderCallback<T> builder, {
  2. String? tag,
})

Registers a factory that creates a new instance on each find, and records scope ownership of the factory registration.

Implementation

static void create<T>(InstanceBuilderCallback<T> builder, {String? tag}) {
  if (Get.isRegistered<T>(tag: tag)) return;
  Get.create<T>(builder, tag: tag);
  _active?.ownInstance<T>(tag: tag);
}