readFile static method

Future<List<String>> readFile([
  1. String? path
])

Read the txt file inside the extracted zip file

Implementation

static Future<List<String>> readFile([String? path]) async {
  path ??= (await getTemporaryDirectory()).path + '/_chat.txt';
  final file = File(path);
  List<String> lines = await file.readAsLines();
  await deleteFile(path);
  return lines;
}