Solve lint issue
This commit is contained in:
parent
9c449964fd
commit
5864b535ca
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue