instanceFor static method

NakamaWebsocketClient instanceFor({
  1. required String key,
})

Returns the instance with given key.

Implementation

static NakamaWebsocketClient instanceFor({required String key}) {
  if (!_clients.containsKey(key)) {
    throw Exception('$key has not yet been initialized');
  }

  return _clients[key]!;
}