-
Notifications
You must be signed in to change notification settings - Fork 9
Description
I'm running algoliasearch 1.22.0 on Flutter Web and keep getting the following error:
[🔔 Dio] sendTimeout cannot be used without a request body to send on Web
[🔔 Dio] _StackTrace (../dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 843:28 get current
....
This is the Repository where the Algolia is configured:
class UsersSearchRepository {
const UsersSearchRepository(this._algoliaSearchClient);
final SearchClient _algoliaSearchClient;
Future<List> search(String inputSearchText) async {
final queryHits = SearchParamsObject(
query: inputSearchText,
);
/
final responseHits = await _algoliaSearchClient.searchSingleIndex(
indexName: 'app_users_collection',
searchParams: queryHits,
);
return responseHits.hits.map((searchHit) {
return AppUser.fromMap(searchHit.toJson());
}).toList();
}
}
Initialized below:
@Riverpod(keepAlive: true)
UsersSearchRepository usersSearchRepository(UsersSearchRepositoryRef ref) {
final algoliaSearch = SearchClient(
appId: 'Foo',
apiKey: 'Bar,
);
return UsersSearchRepository(algoliaSearch);
}