getCallLogs method

  1. @override
Future<List<CallRecord>> getCallLogs(
  1. CallQueryRequest request
)
override

Implementation

@override
Future<List<CallRecord>> getCallLogs(CallQueryRequest request) async {
  final logs = await methodChannel.invokeListMethod<Map<Object?, Object?>>(
    'getCallLogs',
    request.toMap(),
  );
  if (logs == null) return [];

  return logs.map((logMap) => CallRecord.fromMap(logMap)).toList();
}