getServiceFactoryOrNullT method

FutureOr<Service<Object?>>? getServiceFactoryOrNullT(
  1. Type type, {
  2. Object? params,
  3. Entity<Object>? groupEntity,
  4. bool traverse = true,
})
inherited

Implementation

FutureOr<Service>? getServiceFactoryOrNullT(
  Type type, {
  Object? params,
  Entity? groupEntity,
  bool traverse = true,
}) {
  final instance = getFactoryOrNullT(type);
  return instance?.thenOr((e) {
    e as Service;
    return e.initialized ? e : consec(e.init(params), (_) => e);
  });
}