getChildOrNone method

Option<DI> getChildOrNone({
  1. Entity groupEntity = const DefaultEntity(),
})
inherited

Returns the child registered under groupEntity, or None if no child is registered or it failed to construct.

Implementation

Option<DI> getChildOrNone({Entity groupEntity = const DefaultEntity()}) {
  return switch (getChild(groupEntity: groupEntity)) {
    Some(value: Ok(value: final di)) => Some(di),
    _ => const None(),
  };
}