Skip to main content
Question

The setter 'observerMode' isn't defined

  • 30 September 2024
  • 1 reply
  • 53 views

Forum|alt.badge.img+2


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

This post has been closed for comments

1 reply

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 139 replies
  • October 2, 2024

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings