getCallLogs method

  1. @override
Future<List<CallLogEntry>?> getCallLogs({
  1. int limit = 100,
})
override

Implementation

@override
Future<List<CallLogEntry>?> getCallLogs({int limit = 100}) async {
  final logs = (await methodChannel.invokeListMethod<Map>(
      'getCallLog', limit)) as List<Map>;

  /// cast the list of maps to a list of CallLogEntry objects
  return logs.map((log) => CallLogEntry.fromJson(log)).toList();
}