export method

Future<File> export(
  1. String filePath
)

Export the transaction to a file.

This creates a new File with the given filePath and streams the encoded transaction to it.

Implementation

Future<File> export(String filePath) async {
  final encodedTransaction = Encoder.encodeMessagePack(toMessagePack());
  return File(filePath).writeAsBytes(encodedTransaction);
}