sendCommand method

Future<Uint8List> sendCommand(
  1. Application application,
  2. List<int> input, {
  3. List<int>? verify,
})

Implementation

Future<Uint8List> sendCommand(Application application, List<int> input,
    {List<int>? verify}) async {
  final response =
      await (await sendCommands(application, [input], verify: verify)).first;
  if (response is ErrorResponse) {
    throw response.exception;
  } else if (response is SuccessfulResponse) {
    return Uint8List.fromList(response.response);
  } else {
    throw Exception('Response type not supported ${response.runtimeType}');
  }
}