AdaptySDK-Flutter icon indicating copy to clipboard operation
AdaptySDK-Flutter copied to clipboard

fix(android): build fails in Flutter 3.24.x for compileSdk < 31

Open KingkorAtMaxint opened this issue 1 year ago • 2 comments

Fixes #114

KingkorAtMaxint avatar Sep 20 '24 06:09 KingkorAtMaxint

Temporarily this can be used to let the build succeed in your app (if using Flutter 3.24.x)

dependencies:
  adapty_flutter:
    git:
      url: https://github.com/maxint-app/AdaptySDK-Flutter.git
      ref: fix/flutter-3.24.3-android-build-fails
  adapty_ui_flutter: ^2.1.3

dependency_overrides:
  adapty_flutter:
    git:
      url: https://github.com/maxint-app/AdaptySDK-Flutter.git
      ref: fix/flutter-3.24.3-android-build-fails

KingkorAtMaxint avatar Sep 20 '24 06:09 KingkorAtMaxint

Not correct for Flutter 3.29.0:

lib/app/observers/adapty_observer.dart:86:10: Error: Type 'AdaptyPurchaseResult' not found.
  Future<AdaptyPurchaseResult?> callMakePurchase(AdaptyPaywallProduct product) async {
         ^^^^^^^^^^^^^^^^^^^^
lib/app/controllers/subscription_controller.dart:313:14: Error: 'AdaptyPurchaseResultSuccess' isn't a type.
        case AdaptyPurchaseResultSuccess(profile: final profile):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/app/controllers/subscription_controller.dart:316:14: Error: 'AdaptyPurchaseResultUserCancelled' isn't a type.
        case AdaptyPurchaseResultUserCancelled():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/app/controllers/subscription_controller.dart:318:14: Error: 'AdaptyPurchaseResultPending' isn't a type.
        case AdaptyPurchaseResultPending():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/app/controllers/subscription_controller.dart:457:46: Error: The getter 'subscription' isn't defined for the class 'AdaptyPaywallProduct'.

andim27 avatar Feb 18 '25 12:02 andim27