DoHQuestion.fromJson constructor

DoHQuestion.fromJson(
  1. Map<String, dynamic> json
)

Create DNS question from JSON

Implementation

factory DoHQuestion.fromJson(Map<String, dynamic> json) {
  return DoHQuestion(
    name: (json['name'] as String?) ?? '',
    type: (json['type'] as int?) ?? 0,
    dnsClass: (json['class'] as int?) ?? 1,
  );
}