invoke static method

void invoke(
  1. String command,
  2. Object? parameter,
  3. dynamic success,
  4. TTUpgradeProgressCallback progress,
  5. TTUpgradeFailedCallback fail,
)

Implementation

static void invoke(String command, Object? parameter, dynamic success,
    TTUpgradeProgressCallback progress, TTUpgradeFailedCallback fail) {
  if (!isListenEvent) {
    isListenEvent = true;
    _listenChannel
        .receiveBroadcastStream("TTLockUpgradeListen")
        .listen(_onEvent, onError: _onError);
  }
  _upgradeProgressCallback = progress;
  _upgradeFailedCallback = fail;
  _upgradeSuccessCallback = success;
  _commandChannel.invokeListMethod(command, parameter);
}