DeviceKeys.fromDb constructor

DeviceKeys.fromDb(
  1. Map<String, dynamic> dbEntry,
  2. Client client
)

Implementation

DeviceKeys.fromDb(Map<String, dynamic> dbEntry, Client client)
    : super.fromJson(Event.getMapFromPayload(dbEntry['content']), client) {
  final json = toJson();
  identifier = dbEntry['device_id'];
  algorithms = json['algorithms'].cast<String>();
  _verified = dbEntry['verified'];
  _blocked = dbEntry['blocked'];
  lastActive =
      DateTime.fromMillisecondsSinceEpoch(dbEntry['last_active'] ?? 0);
}