RankingInfo Error with "Promoted"

Hi All,

I am trying to perform a search in Flutter using the AlgoliaSearch package and while my search filters work by themselves, when I add getRankingInfo and set it to true, I get the below error in my console:

Uncaught (in promise) Error: CheckedFromJsonException
Could not create RankingInfo.
There is a problem with “promoted”.
TypeError: null: type ‘Null’ is not a subtype of type ‘bool’

I don’t expect to receive a “promoted” value in this case since I’m not using rules to promote hits. Any idea why this value seems to be required when it should be optional, and what I can do to handle this error?

Below is my code. The error is occurring on the last line.

  final clothing = ['Shirts', 'Pants'];
  final size = [2, 8];
  final filters =
      'type:"${clothing.join('" OR type:"')}" AND size:${sizeRange[0]} TO ${sizeRange[1]}';

  final queryHits = SearchForHits(
    indexName: 'shops',
    aroundLatLng: latLng,
    aroundRadius: radiusInt,
    getRankingInfo: true,
    filters: filters,
    hitsPerPage: 20,
  final responseHits = await client.searchIndex(request: queryHits);

Can anyone give any insight here? This feels like it’s something outside of my control but I’m not sure if it requires a change in Algolia, Flutter, or what.