A logging solution for Flutter/Dart apps built purely in Dart.
Note that this is currently only tested for support on Android and iOS. Basic Web support has also been added. However, since web apps do not have access to the file-system as native apps do, the logging for web is session based and it is saved to Downloads only on the call of the export method.
Add this code to begin:
WidgetsFlutterBinding.ensureInitialized();
await NDLogs.setupLogger();
You can start adding logs by simply calling:
NDLogs.logThis("My first log!");
To export logs,
final logFilePath = await NDLogs.exportLogFile();
To clear logs,
await NDLogs.clearLogs();
- Add better ui to HTML log file
Feel free to suggest/ request features as you may desire. However, I'll work on them as I get to them.