I'm trying to do a "tail -f /path/to/log-file.txt" and display the latest log to Flutter. I encountered this
String fileText = await rootBundle.loadString('/path/to/log-file.txt');
print(fileText);
and do a loop every second but the file can be huge so it's better that I get only the latest line that was added to it without having to do an infinite loop like a filechange listener or something.