addRemoteCommand static method
Adds a RemoteCommand to the RemoteCommands
Dispatcher
Implementation
static addRemoteCommand(RemoteCommand remoteCommand) async {
if (!_remoteCommands.containsKey(remoteCommand.id)) {
final callback = remoteCommand.callback;
if (callback != null) {
_addRemoteCommandListener(remoteCommand.id, callback);
}
return await _channel.invokeMethod('addRemoteCommand', {
'id': remoteCommand.id,
'path': remoteCommand.path,
'url': remoteCommand.url,
});
}
}