findOrNull<T> method

T? findOrNull<T>({
  1. String? tag,
})

Find a dependency by type and optional tag (searches hierarchy), returning null if not found or if this scope is disposed.

Symmetric with Zen.findOrNull<T>(). Prefer this over find<T>() for nullable lookups so code stays forward-compatible with v3.0.0.

Implementation

T? findOrNull<T>({String? tag}) => find<T>(tag: tag);