private method

  1. @override
BroadcastChannel private(
  1. String name
)
override

Returns a private BroadcastChannel for name.

The driver will prefix the name (e.g. 'private-') as required by the server and perform the appropriate auth handshake. Like channel, a repeated call for a registered name must return the held instance until a leave or a disconnect: AuthChannelSubscription calls this on every sync and takes a different instance to mean the channel was left.

Implementation

@override
BroadcastChannel private(String name) {
  final String prefixed = 'private-$name';

  return _handles[prefixed] ?? _hold(_FakeBroadcastChannel(prefixed, this));
}