readEncryptedFromFile method

Future<FlightSession> readEncryptedFromFile(
  1. String filePath
)

Reads the file at filePath, decrypts, and deserialises the FlightSession.

Throws EFlightFormatException if the file is not a valid .eflightlog file.

Implementation

Future<FlightSession> readEncryptedFromFile(String filePath) async {
  final Uint8List bytes = await File(filePath).readAsBytes();
  return fromEncryptedBytes(bytes);
}