getCallFromMap static method

Call getCallFromMap(
  1. Map<Object?, Object?> callMap
)

Implementation

static Call getCallFromMap(Map<Object?, Object?> callMap) {
  return Call(
    number:
        (callMap["number"] is String?) ? callMap["number"] as String? : " ",
    id: (callMap["id"] is String?) ? callMap["id"] as String? : " ",
    isOutDirection: (callMap["direction"] is String?)
        ? ((callMap["direction"] as String?) == "Outgoing" ? true : false)
        : false,
    isInConference: (callMap["isInConference"] is bool?)
        ? callMap["isInConference"] as bool?
        : false,
    isMuted:
        (callMap["isMuted"] is bool?) ? callMap["isMuted"] as bool? : false,
    callState: (callMap["state"] is String?)
        ? getCallStateFromString(state: callMap["state"] as String?)
        : CallState.error,
  );
}