Monetizing apps with Flutter
Why Stack Overflow recommends it
Stack Overflow users link it as the official walkthrough for putting AdMob banner and native ads into a Flutter app, and many of them quote its code while debugging errors.
Recommended by 1 people across 1 different months, 2021 to 2022.
What it is
A 22-minute Flutter Engage 2021 talk in which Flutter team members Andrew Brogdon and Zoey Fan cover ways to monetize Flutter apps, with a focus on adding Google Mobile Ads (AdMob) to an app. It includes a walkthrough of the mobile ads package and how to place ads in a Flutter UI.
What people said
Recommends IcyHerrscher · 2021-10 · Stack Overflow · on “How to place scrollable ads in my flutter app with admob?”
I recommend watching this tutorial from the Flutter team [this video] They included how to do that in their videos.
Cites fayssal el ansari · 2021-06 · Stack Overflow · on “I get an IllegalStateException sometimes in flutter app after adding native ads to a listview”
this is the error I get: setState() called after dispose(): _PlatformViewLinkState#bc2a5(lifecycle state: defunct, not mounted) This error happens if you... E/flutter ( 4758): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(49)] java.lang.IllegalStateException: PlatformView#getView() returned null, but an Android view reference was expected. I'm using the google_mobile_ads package and not the firebase_ads one since it's deprecated. I'm trying to put native ads in a list of cards, after a fixed number of elements in the listview. The way I did this is by using a provider in the main.dart file: ... void main() { WidgetsFlutterBinding.ensureInitialized(); final initFutur
Cites Silent Roar · 2021-07 · Stack Overflow · on “Did i miss anything from flutter google ad mob tutorial?”
i am trying to monitize my app using admob but its really hard to implement it in the app even with the youtube, now everything is set but it gives the following error, here is the code [LINK] and here is the ad state [LINK] and this is the main code void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); var appDocumentDirectory = await pathProvider.getApplicationDocumentsDirectory(); Hive.init(appDocumentDirectory.path); Hive.registerAdapter(MonsterAdapter()); final initFuture = MobileAds.instance.initialize(); final adState = AdState(initFuture); runApp( Provider.value( value: adState, builder: (context, child) => MyApp() ), ); } it shows error LateI
Cites Randomize · 2022-02 · Stack Overflow · on “How to fix the issue "Ad.load to be called before AdWidget is inserted into the tree" issue with Flutter / Admob?”
I am using google_mobile_ads: ^1.1.0 version on Flutter and following the video here: [this video] Apart some small changes respect to the video (I guess not fully up to date compare to the most recent API changes) I have now the following code: void main() async { WidgetsFlutterBinding.ensureInitialized(); final initFuture = MobileAds.instance.initialize(); final adState = AdState(initFuture); await SystemChrome.setPreferredOrientations(<DeviceOrientation>[ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown ]).then((_) => runApp( MultiProvider( providers: [ ChangeNotifierProvider(create: (_) => Something()), ...some other ChangeNotifierProvider..., Provider<AdState>(create: (_) => adSt
Cites Kalma Gaz · 2022-03 · Stack Overflow · on “AdListener isn't a type”
I'm following this official Flutter tutorial [this video] I wrote the same code as in the video tutorial, but when I added the AdListener inside AdState class , the Android Studio gave me an error: the AdListener isn't a type .