lastCommand method

NativeCommand? lastCommand(
  1. String service
)

Get the last command sent to a service.

Implementation

NativeCommand? lastCommand(String service) {
  for (var i = sentCommands.length - 1; i >= 0; i--) {
    if (sentCommands[i].service == service) {
      return sentCommands[i];
    }
  }
  return null;
}