Closed ghost closed 3 years ago
Thanks for reporting it. Can you share a piece of code that recreates this bug?
This is my entry point in main.dart file and this is how I initialize Appodeal.
`Future
//Crashes here while initialization await Appodeal.initialize( hasConsent: true, adTypes: [AdType.BANNER, AdType.INTERSTITIAL, AdType.REWARD, AdType.NON_SKIPPABLE], testMode: true, verbose: true);
runApp(MyApp()); }`
To debug more, I edited the Appodel library directly and commented out _setCallbacks() function, and removed calling _setCallbacks() function inside initialize() method. Then it worked as expected.
as Future
I tried out the example project provided in the library. It works fine because it is using version 0.6.0.
Thanks, I will investigate this later today.
Just curious, why do you think the example project is using version 0.6.0
? It actually imports the library directly from the /lib
folder.
as Future Function(MethodCall)?); - I couldn't find this piece of code at _setCallbacks() method in the example project and checked pubspec.yaml, it shows the library version is 0.6.0. So I guessed it is using the older version of the library. Correct me if I'm wrong.
Hello, Are there any updates? I have a same issue in 1.0.0.
@senthamizhraj @SleepyMrPanda Please update your pubspec.yaml
file and import appodeal_flutter
directly from the bugfix branch that I created (see below). Let me know if the version in this branch fixed the error and I will merge it in case it's working.
appodeal_flutter:
git:
url: https://github.com/vegidio-flutter/appodeal.git
ref: bugfix/set-callback
Thanks.
@vegidio It's working for me.
@vegidio It is working fine now. Thanks for your time.
Fixed in version 1.0.1
Crash Log: Unhandled Exception: type '(dynamic) => Null' is not a subtype of type '((MethodCall) => Future)?' in type cast
0 Appodeal._setCallbacks (package:appodeal_flutter/src/appodeal.dart:126:7)
1 Appodeal.initialize (package:appodeal_flutter/src/appodeal.dart:37:5)
Any fix would be greatly appreciated.