putFactory<T> static method

void putFactory<T>(
  1. T factory(), {
  2. String? tag,
})

Register a factory in root scope

Implementation

static void putFactory<T>(T Function() factory, {String? tag}) {
  // Factories don't support permanent - they create new instances each time
  rootScope.putFactory<T>(factory, tag: tag);
}