readFileAsLineByline method
Reads a file and returns its content as a list of lines.
Implementation
Future<List<String?>?> readFileAsLineByline(
{required String filePath}) async {
try {
var fileAsString = await File(filePath).readAsString();
return fileAsString.split('\n');
} catch (e) {
return null;
}
}