Problems regarding to Exports logs
lutang123 opened this issue · 3 comments
Hello
On the library description, it says "Logs can easily be exported as zip file base on filter type, the zip file can then be uploaded to server or to use it locally."
I see there is a function to export and this will export to an external storage, so this will save logs in a db and txt file on user's phone. But how to get these logs sent to company's email so that developer can access user's logs? I means if it just saved on user's phone and still can't access, that's not very useful right? but I couldn't find any other resources on how to do it. How to export as a zip file and then upload to server?
This might not be an issue, but I don't know how to do it and if anyone knows, please share with me, thank you!
There is an exception caused by casting on: getAllLogs() in class FlogDao
E/flutter ( 2903): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: type 'Future<List<RecordSnapshot<int, Map<String, Object?>>>>' is not a subtype of type 'FutureOr<List<RecordSnapshot<int, Map<String, Object>>>>' in type cast
E/flutter ( 2903): #0 FlogDao.getAllLogs (package:f_logs/data/local/flog_dao.dart:100)
E/flutter ( 2903):
E/flutter ( 2903): #1 FLog._getAllLogs (package:f_logs/model/flog/flog.dart:433)
E/flutter ( 2903):
E/flutter ( 2903): #2 FLog.exportLogs (package:f_logs/model/flog/flog.dart:262)
E/flutter ( 2903):
E/flutter ( 2903): #3 DebuggingScreen._onEmailLogs (package:Relivion/ui/profile/debugging_screen.dart:170)
E/flutter ( 2903):
You can use the share_plus pluggin, it has support to share files
Share.shareFiles( ['${directory.path}/FLogs/flog.txt'], text: 'Log', );