toString method
For print formatting.
Implementation
@override
String toString() {
final textAndScore = 'text: $text, score: ${score.toStringAsFixed(2)}';
if (value != null) {
return '$textAndScore, value: $value';
} else {
return textAndScore;
}
}