showCallNotification static method

Future<void> showCallNotification({
  1. required String? mettingId,
  2. required String? uuid,
  3. required int? callType,
  4. required int? callerId,
  5. required String? callerName,
  6. required String? callerAvatar,
  7. required Set<int>? opponentsIds,
  8. Map<String, String>? userInfo,
})

Implementation

static Future<void> showCallNotification({
  required String? mettingId,
  required String? uuid,
  required int? callType,
  required int? callerId,
  required String? callerName,
  required String? callerAvatar,
  required Set<int>? opponentsIds,
  Map<String, String>? userInfo,
}) async {
  if (!Platform.isAndroid) return;

  return _channel.invokeMethod("showCallNotification", {
    'metting_id': mettingId,
    'uuid': uuid,
    'call_type': callType,
    'caller_id': callerId,
    'caller_name': callerName,
    'caller_avatar': callerAvatar,
    'call_opponents': opponentsIds!.join(','),
    'user_info': userInfo != null ? jsonEncode(userInfo) : jsonEncode(Map()),
  });
}