i want to get my call logs and i used call logs package and on button click, i call tthis function
void calllog() async{
Iterable<CallLogEntry> entries = await CallLog.get();
for (var item in entries) {
print(item.name);
}
}
but its shooting me an error like this
[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(INTERNAL_ERROR, Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference, null, null)
PS: i am using this package: call_log: ^3.0.3