current property
SocketContext
get
current
Get the current socket context from the zone.
Implementation
static SocketContext get current {
final context = Zone.current[_contextKey] as SocketContext?;
if (context == null) {
throw StateError('SocketContext is not available in the current zone.');
}
return context;
}