Call.fromMap constructor
Factory method to construct Call from dictionary
Implementation
factory Call.fromMap(Map<Object?, Object?> callMap) {
return Call(
number:
(callMap["number"] is String?) ? callMap["number"] as String? : " ",
formattedNumber:
(callMap["formattedNumber"] is String?) ? callMap["formattedNumber"] 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?)
? CallState.fromString(state: callMap["state"] as String?)
: CallState.error,
);
}