Are you looking to monetize your mobile app?
You can do that by adding in-app ads using the
google_mobile_ads package. You’ll need to register a free
account with AdMob and you can then leverage
one or more AdMob features, including the following:
- Several ad formats: Banner, full-screen, native, and rewarded.
- Control over when ads display. For example, in between levels of a game, after completing a task, or before starting a new game
- Monetization reports to help you make decisions about your app.
- Get started with the AdMob guide
- Create an AdMob account tutorial
google_mobile_adspackage on pub.dev
The background processing path shows you how to run a Dart function in the background on mobile devices. With background processing, you can perform tasks like making an HTTP request, running an expensive calculation, or displaying a notification in another isolate (similar to a lightweight thread).
There are a of couple ways to incorporate background processing into your mobile app. One way is through a Dart isolate. With a Dart isolate, you can create a separate thread to run tasks concurrently in the background.
Another way to incorporate background processing is through the WorkManager plugin. With this plugin, you can enable persistent headless execution of Dart code. Your tasks remain scheduled through app restarts and system reboots.
Some features of WorkManager include:
- Persistent work handling
- Flexible scheduling
- Ability to apply constraints on jobs like checking for a network connection, only running when the device is charging, or only running when a device is idle (Android only)
Geolocation, the ability to determine where in the world a user is located, is critical functionality for many applications; for example, shopping apps need to calculate shipping, fitness apps need to track distance traveled, and so on. The plugins in Flutter’s ecosystem offer a number of features to help build these experiences.
A plugin that provides this functionality is the
geolocator plugin, rated as a Flutter favorite.
With this plugin, you can check and request permission,
fetch a one-time location, and even provide a stream
of constantly updated values as a user moves about.
- Ability to get a device’s current location
- Receive location updates
- Ability to determine whether a devices’s location services are enabled
- How to get a user’s location with the geolocator plugin tutorial
For an easy way to represent immutable application data,
check out two plugins that provide ways to handle and manipulate
both rated as Flutter favorites.
These plugins can be used independently,
but are also great when used together.
freezed package handles in-memory objects
json_serializable maps those immutable
objects to and from the JSON format.
Structured local storage
Structured local storage increases app performance and
improves the user experience by selectively saving expensive
or slow data on a user’s device.
This path suggests two plugins for local persistence:
Which plugin you choose depends on your needs.
Drift, rated a Flutter favorite, offers a fully-typed object relational mapping (ORM) around SQLite, with support on all Flutter platforms. Developers who require a fully relational database on their users’ device will benefit most from this package.
Hive offers a fully-typed object document mapping (ODM) around a custom storage solution, with support on all Flutter platforms. Developers who do not require a fully relational database, especially if they use document-based storage on their server (like Cloud Firestore) will benefit most from this package.
Web sockets enable communication between Flutter clients and servers. This path suggests two packages to use when installing and using web sockets.