sendKey method Null safety

Future<void> sendKey(
  1. dynamic key
)

Implementation

Future<void> sendKey(key) async {
  final packet = JSON.stringify({
    "method": "ms.remote.control",
    "params": {
      "Cmd": "Click",
      "DataOfCmd": key,
      "Option": "false",
      "TypeOfRemote": "SendRemoteKey"
    }
  });

  print('packet ${packet}');
  await send(packet);
}