upgrade min sdk; run formatter
This commit is contained in:
@@ -15,10 +15,9 @@ final kagiAutosuggestServiceProvider =
|
||||
NotifierProvider<KagiAutosuggestService, void>.internal(
|
||||
KagiAutosuggestService.new,
|
||||
name: r'kagiAutosuggestServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$kagiAutosuggestServiceHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$kagiAutosuggestServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -37,29 +37,27 @@ sealed class FtsQueryBuilder {
|
||||
}) {
|
||||
final matches = _tokenizePattern.allMatches(input);
|
||||
|
||||
final barewords =
|
||||
matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
} else if (_barewordPattern.hasMatch(match.group(2)!)) {
|
||||
return SimpleBareword(match.group(2)!);
|
||||
} else {
|
||||
return EnclosedBareword(match.group(2)!);
|
||||
}
|
||||
})
|
||||
.where((token) => token.word.isNotEmpty)
|
||||
.whereNot(_isReservedBareword)
|
||||
.toList();
|
||||
final barewords = matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
} else if (_barewordPattern.hasMatch(match.group(2)!)) {
|
||||
return SimpleBareword(match.group(2)!);
|
||||
} else {
|
||||
return EnclosedBareword(match.group(2)!);
|
||||
}
|
||||
})
|
||||
.where((token) => token.word.isNotEmpty)
|
||||
.whereNot(_isReservedBareword)
|
||||
.toList();
|
||||
|
||||
//Merge short tokens
|
||||
_mergeShortBarewords(barewords, minTokenLength);
|
||||
|
||||
_tokens =
|
||||
barewords
|
||||
.where((bareword) => bareword.word.length >= minTokenLength)
|
||||
.take(tokenLimit)
|
||||
.toList();
|
||||
_tokens = barewords
|
||||
.where((bareword) => bareword.word.length >= minTokenLength)
|
||||
.take(tokenLimit)
|
||||
.toList();
|
||||
}
|
||||
|
||||
static void _mergeShortBarewords(
|
||||
|
||||
@@ -33,17 +33,16 @@ sealed class UnixTokenizer {
|
||||
}) {
|
||||
final matches = _tokenizePattern.allMatches(input);
|
||||
|
||||
final barewords =
|
||||
matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
} else {
|
||||
return SimpleBareword(match.group(2)!);
|
||||
}
|
||||
})
|
||||
.where((token) => token.word.isNotEmpty)
|
||||
.toList();
|
||||
final barewords = matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
} else {
|
||||
return SimpleBareword(match.group(2)!);
|
||||
}
|
||||
})
|
||||
.where((token) => token.word.isNotEmpty)
|
||||
.toList();
|
||||
|
||||
//Merge short tokens
|
||||
_mergeShortBarewords(barewords, minTokenLength);
|
||||
|
||||
Reference in New Issue
Block a user