activeCalls method
Get active calls. On iOS: return active calls from Callkit. On Android: return active calls from SharedPrefs
Helpful when starting the app from terminated state to retrieve information about latest calls
Implementation
Future<List<CallKeepCallData>> activeCalls() async {
final activeCallsRaw = await _channel.invokeMethod<List>("activeCalls");
if (activeCallsRaw == null) return [];
return activeCallsRaw
.map<Map<String, dynamic>>((e) => Map<String, dynamic>.from(e))
.map((e) => CallKeepCallData.fromMap(e))
.toList();
}