getCallLogs method

  1. @override
Future<List<CallLogEntry>?> getCallLogs()
override

Implementation

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

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