startInputListener static method
Future<String>
startInputListener(
- StarXpandPrinter printer,
- StarXpandCallback<
StarXpandInputPayload> callback
Implementation
static Future<String> startInputListener(StarXpandPrinter printer,
StarXpandCallback<StarXpandInputPayload> callback) async {
var guid = _addCallbackHandler(
StarXpandCallbackHandler<StarXpandInputPayload>(
(payload) => callback.call(payload),
(type, data) =>
StarXpandInputPayload(type, Map<String, dynamic>.from(data))));
await _channel.invokeMethod(
'startInputListener', {"callback": guid, "printer": printer.toMap()});
return guid;
}