save function

Future<void> save(
  1. String fileName,
  2. ECPrivateKey privateKey
)

Saves the private key to a file.

Implementation

Future<void> save(String fileName, ECPrivateKey privateKey) async {
  var file = File(fileName);
  await file.create();
  await file.writeAsString(serialize(privateKey).toString());
}