requestSubscribeChannels method
Android Only. Completion confirms dispatch, not subscription authorization. Authorization results arrive through onCommandResult, cmd=2013.
Implementation
@override
Future<void> requestSubscribeChannels(List<String> channelIds) async {
if (_isIOS) return super.requestSubscribeChannels(channelIds);
if (channelIds.isEmpty || channelIds.length > 3 ||
channelIds.any((id) => id.trim().isEmpty) ||
channelIds.toSet().length != channelIds.length) {
throw ArgumentError.value(channelIds, 'channelIds',
'Expected 1-3 unique, non-empty channel IDs.');
}
await _channel.invokeMethod<void>(
'requestSubscribeChannels', {'channelIds': List<String>.of(channelIds)});
}