maybeBloomOf<T> method
Reactively subscribes to an optional ancestor BloomProvider and returns its inner Bloom state.
Exact Type Resolution:
Lookup matches the exact reified type T. Subtypes or base classes do not match.
Ensures:
- Returns the ancestor provider's Bloom, or Bloom.constantNull if no matching ancestor provider exists.
Examples
final optionalTheme = context.maybeBloomOf<AppTheme>();
Implementation
@pragma('vm:prefer-inline')
Bloom<T?> maybeBloomOf<T>() {
final provider = dependOnInheritedWidgetOfExactType<BloomProvider<T>>();
return provider?.bloom ?? Bloom.constantNull;
}