GetPresenceResponse.fromJson constructor

GetPresenceResponse.fromJson(
  1. Map<String, Object?> json
)

Implementation

GetPresenceResponse.fromJson(Map<String, Object?> json)
  : currentlyActive = ((v) =>
        v != null ? v as bool : null)(json['currently_active']),
    lastActiveAgo = ((v) =>
        v != null ? v as int : null)(json['last_active_ago']),
    presence = PresenceType.values.fromString(json['presence'] as String)!,
    statusMsg = ((v) => v != null ? v as String : null)(json['status_msg']);