Skip to main content


I got the folloing error after updagting purchases_flutter from 6.26.0 to 8.1.3. I am using Android 
studio on iMac. 

How can I fix this error

The setter 'observerMode' isn't defined for the type 'PurchasesConfiguration'. (Documentation)  Try importing the library that defines 'observerMode', correcting the name to the name of an existing setter, or defining a setter or field named 'observerMode'.

This is my code:
PurchasesConfiguration configuration;
  if (StoreConfig.isForAmazonAppstore()) {
    configuration = AmazonConfiguration(StoreConfig.instance.apiKey)
      ..appUserID = null
      ..observerMode = false;
  } else {
    configuration = PurchasesConfiguration(StoreConfig.instance.apiKey)
      ..appUserID = null
      ..observerMode = false;
  }
  await Purchases.configure(configuration);
} // end

Hi @tjkh! `observerMode` is now `PurchasesAreCompletedBy`. More details are available in the 7.0.0 Flutter SDK release when this change happened.

Also, please review the 8.0.0. Flutter SDK release to ensure you’re doing any necessary migrations. For release >= 8.0.0, you must ensure that your in-app purchase key for iOS has been configured.

Thanks!


Reply