maybeOf static method
Finds the StreamChannelState from the closest StreamChannel ancestor that encloses the given context.
Returns null if no such ancestor exists.
See also:
- of, which throws if no StreamChannel is found.
Implementation
static StreamChannelState? maybeOf(BuildContext context) {
return context.findAncestorStateOfType<StreamChannelState>();
}