getOrFail<T extends ServerChannel> method

T getOrFail<T extends ServerChannel>(
  1. String id
)

Implementation

T getOrFail<T extends ServerChannel>(String id) =>
    _channels.values.firstWhere((element) => element.id.value == id,
        orElse: () => throw Exception('Channel not found')) as T;