File size: 694 Bytes
b225a21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class Ground {
  final String answer;
  final List<String> shouldContain;
  final List<String> shouldNotContain;
  final List<String> files;
  final Map<String, dynamic> eval;

  Ground({
    required this.answer,
    required this.shouldContain,
    required this.shouldNotContain,
    required this.files,
    required this.eval,
  });

  factory Ground.fromJson(Map<String, dynamic> json) {
    return Ground(
      answer: json['answer'] ?? "",
      shouldContain: List<String>.from(json['should_contain'] ?? []),
      shouldNotContain: List<String>.from(json['should_not_contain'] ?? []),
      files: List<String>.from(json['files'] ?? []),
      eval: json['eval'] ?? {},
    );
  }
}