ChatPresence.fromJson constructor

ChatPresence.fromJson(
  1. Map map
)

Implementation

factory ChatPresence.fromJson(Map map) {
  String publisher = map["publisher"] ?? "";
  String statusDescription = map["statusDescription"] ?? "";
  int latestTime = map["lastTime"] ?? 0;
  int expiryTime = map["expiryTime"] ?? 0;
  Map<String, int>? statusDetails = map["statusDetails"]?.cast<String, int>();
  return ChatPresence._private(
    publisher,
    statusDescription,
    statusDetails,
    latestTime,
    expiryTime,
  );
}