Solve lint issue

This commit is contained in:
vjrj 2026-07-10 10:34:43 +02:00
parent 9c449964fd
commit 5864b535ca

View file

@ -46,12 +46,12 @@ String? matchSpeciesInLabel(String label, List<SpeciesNameEntry> names) {
if (!_containsSequence(haystack, needle)) continue;
final chars = needle.fold<int>(0, (sum, t) => sum + t.length);
final score = (tokens: needle.length, chars: chars);
if (best == null || _isBetter(score, best!)) {
if (best == null || _isBetter(score, best)) {
best = score;
winners
..clear()
..add(entry.speciesId);
} else if (score.tokens == best!.tokens && score.chars == best!.chars) {
} else if (score.tokens == best.tokens && score.chars == best.chars) {
winners.add(entry.speciesId);
}
}