emailLog static method
Email the result of getLog using device's mail client. Provide an optional SQLQuery to contrain results between dates.
Example
Logger.emailLog('foo@bar.com').then((bool success) {
print('[emailLog] success');
}).catchError((error) {
print('[emailLog] FAILURE: ${error}');
});
// Or constrain results by providing a [SQLQuery]:
Logger.emailLog('foo@bar.com', SQLQuery(
start: DateTime.parse('2019-10-20 09:00'),
end: DateTime.parse('2019-10-20 11:59')
)).then((bool success) {
print('[emailLog] success');
}).catchError((error) {
print('[emailLog] FAILURE: ${error}');
});
Implementation
static Future<bool> emailLog(String email, [SQLQuery? query]) async {
query = (query != null) ? query : new SQLQuery();
return await (_methodChannel.invokeMethod<bool?>(
'emailLog', [email, query.toMap()])) as FutureOr<bool>;
}