初始化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
part of '_dnsolve.dart';
|
||||
|
||||
class _Question {
|
||||
const _Question({required this.name, required this.rType});
|
||||
|
||||
final String? name;
|
||||
final RecordType? rType;
|
||||
|
||||
factory _Question.fromJson(Map<String, dynamic>? json) {
|
||||
if (json == null) {
|
||||
return const _Question(name: null, rType: null);
|
||||
}
|
||||
|
||||
return _Question(
|
||||
name: json['name'] as String,
|
||||
rType: DNSolve.intToRecord(json['type'] as int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => '''(name: $name, rType: $rType)''';
|
||||
}
|
||||
Reference in New Issue
Block a user