onTrialEnd method
Future<void>
onTrialEnd({
- required Trial trial,
- required Transcript transcript,
- required Outcome outcome,
- required List<
Score> scores,
override
Called when trial finishes with the final transcript, outcome, and scores. Implementations should attach all scores here.
Implementation
@override
Future<void> onTrialEnd({
required Trial trial,
required Transcript transcript,
required Outcome outcome,
required List<Score> scores,
}) async {
_write({
'kind': 'trial_end',
'trial': trial.toJson(),
'transcript': transcript.toJson(),
'outcome': outcome.toJson(),
'scores': scores.map((s) => s.toJson()).toList(),
});
}