reprint method
Reprints the last transaction receipt via the native platform.
Returns a String containing the reprint result, or null
if the operation fails.
Throws an exception if an error occurs during platform communication.
This method is only available on Android.
Implementation
@override
Future<String?> reprint() async {
try {
if (_transactionInProgress) {
return null;
}
_transactionInProgress = true;
final result =
await methodChannel.invokeMethod<String>('reprintDeeplink');
if (result == null) {
return null;
}
_transactionInProgress = false;
final transaction = Transaction.fromJson(result);
return transaction.result;
} catch (e) {
_transactionInProgress = false;
rethrow;
}
}