getServiceFactoryWithParamsOrNull<T extends Service<P>, P extends Object?> method

FutureOr<T>? getServiceFactoryWithParamsOrNull<T extends Service<P>, P extends Object?>({
  1. required P params,
  2. Entity<Object>? groupEntity,
  3. bool traverse = true,
})
inherited

Implementation

FutureOr<T>? getServiceFactoryWithParamsOrNull<T extends Service<P>,
    P extends Object?>({
  required P params,
  Entity? groupEntity,
  bool traverse = true,
}) {
  final instance = getFactoryOrNull<T>();
  return instance?.thenOr(
    (e) => e.initialized ? e : consec(e.init(params), (_) => e),
  );
}