subscribe method

Future<String> subscribe (
  1. String channelName
)

Implementation

Future<String> subscribe(String channelName) async {
  if (channelName == null || channelName.trim().length == 0) {
    throw new Exception(
        "channelName is invalid. Please provide a valid name for subscribe");
  }

  var params = <String, dynamic>{'channelName': channelName};

  return _channel.invokeMethod("subscribe", params);
}