of static method
Use this method to get the current StreamChannelState instance
Implementation
static StreamChannelState of(BuildContext context) {
StreamChannelState? streamChannelState;
streamChannelState = context.findAncestorStateOfType<StreamChannelState>();
assert(
streamChannelState != null,
'You must have a StreamChannel widget at the top of your widget tree',
);
return streamChannelState!;
}