functional_admob_flutter 0.1.1
functional_admob_flutter: ^0.1.1 copied to clipboard

Flutter Android iOS Linux macOS web Windows

Functional Admob Flutter

functional_admob_flutter #

Functional Admob Flutter

Introduction #

This project is a functional version of the admob_flutter,

First of all, you have to follow admob_flutter setup. #

from here

One line functional Usage #


import 'package:functional_admob_flutter/functional_admob.dart';
  await FunctionalAdmob.interstitial('adUnitId');


import 'package:functional_admob_flutter/functional_admob.dart';
  await FunctionalAdmob.reward('adUnitId');

Detailed Functional Usage #


import 'package:functional_admob_flutter/functional_admob_interstitial.dart';
  Future _demoFunctionalInterstitial() async {
    final interstitialAd = FunctionalAdmobInterstitial(
      adUnitId: getInterstitialAdUnitId(),

    if (!await interstitialAd.load()) throw 'Failed to load interstitial Ad';



import 'package:functional_admob_flutter/functional_admob_reward.dart';
  Future _demoFunctionalReward() async {
    final rewardAd = FunctionalAdmobReward(
      adUnitId: getRewardBasedVideoAdUnitId(),

    if (!await rewardAd.load()) throw 'Failed to load reward Ad';

    final result = await;
    if (result != null) {

      print('Type: ${result['type']}');
      print('Amount: ${result['amount']}');
    } else {
      print('failed to get reward!');