easy_ads 2.5.4

  • Readme
  • Changelog
  • Installing
  • 74

easy_ads #

A package which gives the developer a static and very simple way to implement Ads. This package depends on flutter.dev's firebase_admob plugin and on the static_sharedpreferences package.

Getting Started on Android #

You have to modifiy the AndroidManifest.xml in the following way for this to work:

1) #

Add the following lines in the <application/> tag, infront of the <activity/> tag:
    <!-- TestAd AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="[ADMOB_APP_ID]"/>

Replace [ADMOB_APP_ID] with your App ID. You must pass the same value when you initialize the plugin in your Dart code.

2) This is optional #

Add the following lines in the <manifest/> tag:
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

See https://goo.gl/fQ2neu for more information about configuring AndroidManifest.xml and setting up your App ID.

Getting Started on IOS #

Admob 7.42.0 requires the App ID to be included in Info.plist. Failure to do so will result in a crash on launch of your app. The lines should look like:

    <!-- TestAd AdMob App ID: ca-app-pub-3940256099942544~1458002511 -->
    <key>GADApplicationIdentifier</key>
    <string>[ADMOB_APP_ID]</string>

Replace [ADMOB_APP_ID] with your App ID. You must pass the same value when you initialize the plugin in your Dart code.

See https://developers.google.com/admob/ios/quick-start#update_your_infoplist for more information about configuring Info.plist and setting up your App ID.

More Info #

https://pub.dev/packages/firebase_admob

2.5.4 #

  • Fixed a potential bug where [showAdOnCount] and [showAdOnCountAffected] would stop working.

2.5.3 #

  • Added 'isRewarded' to EasyRewardedVideoAd.

2.5.2 #

  • Added: export 'assets.dart'; to easy_ads.dart
  • Added: export 'mobile_ad_targeting_info.dart'; to easy_ads.dart
  • Changed a few docs.

2.5.1 #

  • Updated dependencies.

2.5.0 #

  • Added a Timer on AdFailedToLoad, so that if [autoReload] is enabled the ad does not execute [load] in kind of a 'while(true)' loop

2.4.1 #

  • Fixed a bug where MobileAdTargetingInfo was null in the EasyRewardedVideoAd.

2.4.0 #

  • Fixed onAdEvent Function. Removed the necesserity to depend on the firebase_admob package for some enums and classes (RewardedVideoAdEvent, MobileAdEvent, AdSize, AnchorType,...)

2.3.0 #

  • Fixed some bugs in banner_ad.dart and interstitial_ad.dart and changed some docs.

2.2.1 #

  • Fixed bug concerning _count in rewarded_video_ad.dart

2.2.0 #

  • Fixed some bugs concerning showOnCount and showOnCountAffected

2.1.3 #

  • Changed some docs.

2.1.2 #

  • Changed some docs.

2.1.1 #

  • Fixed the bug where blockAdsUntil in HealthyEasyRewardedVideoAd was not initialized.

2.1.0 #

  • Added the ability to block ads for a certain amount of events. Has not been checked for bugs yet.

2.0.0 #

  • Added healty ads classes.

1.3.2 #

  • Updated dependencies.

1.3.1 #

  • Updated dependencies.

1.3.0 #

  • Finally fixed the bug which caused HealthyEasyRewardedVideoAd to not work in its' intended way.
  • Also updated some dependencies.

1.2.3 #

  • Minor bugfix.

1.2.2 #

  • Minor bugfix.

1.2.1 #

  • Fixed a bug where SharedPreferences took woo long to initialize.

1.2.0 #

  • Should have fixed HealthyEasyRewardedVideoAd now.

1.1.0 #

  • Added HealthyEasyRewardedVideoAd class.

1.0.0 #

  • First release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  easy_ads: ^2.5.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:easy_ads/easy_ads.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
56
Health:
Code health derived from static analysis. [more]
95
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform android

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform linux

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:easy_ads/mobile_ad_targeting_info.dart that imports:
  • package:firebase_admob/firebase_admob.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:easy_ads/mobile_ad_targeting_info.dart that imports:
  • package:firebase_admob/firebase_admob.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:easy_ads/mobile_ad_targeting_info.dart that imports:
  • package:firebase_admob/firebase_admob.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:easy_ads/easy_ads.dart that imports:
  • package:easy_ads/rewarded_video_ad.dart that imports:
  • package:easy_ads/mobile_ad_targeting_info.dart that imports:
  • package:firebase_admob/firebase_admob.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • easy_ads that is a package requiring null.

Health suggestions

Fix lib/mobile_ad_targeting_info.dart. (-4.41 points)

Analysis of lib/mobile_ad_targeting_info.dart reported 9 hints, including:

line 25 col 16: 'birthday' is deprecated and shouldn't be used. This functionality is deprecated in AdMob without replacement..

line 27 col 16: 'gender' is deprecated and shouldn't be used. This functionality is deprecated in AdMob without replacement..

line 29 col 16: 'designedForFamilies' is deprecated and shouldn't be used. Use childDirected instead..

line 40 col 7: 'birthday' is deprecated and shouldn't be used. This functionality is deprecated in AdMob without replacement..

line 40 col 17: 'birthday' is deprecated and shouldn't be used. This functionality is deprecated in AdMob without replacement..

Fix lib/assets.dart. (-1 points)

Analysis of lib/assets.dart reported 2 hints:

line 77 col 26: This function has a return type of 'EasyRewardedVideoAdEvent', but doesn't end with a return statement.

line 120 col 19: This function has a return type of 'EasyMobileAdEvent', but doesn't end with a return statement.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and easy_ads.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
firebase_admob ^0.9.3+2 0.9.3+2
flutter 0.0.0
static_sharedpreferences ^1.3.0 1.3.5
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
file 5.2.1
firebase 7.3.0
firebase_core 0.4.5
firebase_core_platform_interface 1.0.4
firebase_core_web 0.1.1+2
flutter_web_plugins 0.0.0
http 0.12.1
http_parser 3.1.4
intl 0.16.1
js 0.6.2
matcher 0.12.8
meta 1.1.8 1.2.1
path 1.7.0
path_provider_linux 0.0.1+2
path_provider_platform_interface 1.0.2
pedantic 1.9.0 1.9.1
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
quiver 2.1.3
shared_preferences 0.5.8
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
xdg_directories 0.1.0
Dev dependencies
flutter_test