option to disable autosuggest
This commit is contained in:
@@ -7,7 +7,7 @@ part of 'duckduckgo.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$duckDuckGoAutosuggestServiceHash() =>
|
||||
r'1679e6d9bce7cb380b1ee60c768abe2fddb79478';
|
||||
r'd9f30a577b276049b252be890bc73eb18aa118f2';
|
||||
|
||||
/// See also [DuckDuckGoAutosuggestService].
|
||||
@ProviderFor(DuckDuckGoAutosuggestService)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:exceptions/exceptions.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/features/search/domain/entities/abstract/i_search_suggestion_provider.dart';
|
||||
|
||||
part 'empty.g.dart';
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
class EmptyAutosuggestService extends _$EmptyAutosuggestService
|
||||
implements ISearchSuggestionProvider {
|
||||
@override
|
||||
void build() {}
|
||||
|
||||
@override
|
||||
Future<Result<List<String>>> getSuggestions(String query) {
|
||||
return Future.value(Result.success([]));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'empty.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$emptyAutosuggestServiceHash() =>
|
||||
r'7fbe81807baf379cf621ef46fba00e46778978f8';
|
||||
|
||||
/// See also [EmptyAutosuggestService].
|
||||
@ProviderFor(EmptyAutosuggestService)
|
||||
final emptyAutosuggestServiceProvider =
|
||||
NotifierProvider<EmptyAutosuggestService, void>.internal(
|
||||
EmptyAutosuggestService.new,
|
||||
name: r'emptyAutosuggestServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$emptyAutosuggestServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$EmptyAutosuggestService = Notifier<void>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
@@ -1,13 +1,14 @@
|
||||
import 'package:exceptions/exceptions.dart';
|
||||
|
||||
enum SearchSuggestionProviders {
|
||||
none('Disabled', null),
|
||||
brave('Brave', 'brave'),
|
||||
ddg('DuckDuckGo', 'ddg'),
|
||||
kagi('Kagi', 'kagi'),
|
||||
qwant('Qwant', 'qwant');
|
||||
|
||||
final String label;
|
||||
final String relatedBang;
|
||||
final String? relatedBang;
|
||||
|
||||
const SearchSuggestionProviders(this.label, this.relatedBang);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user