Skip to content

Commit

Permalink
fix: Fixed MasamuneControllerBase where adapter was not specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Aug 1, 2023
1 parent 2383db8 commit 04493af
Show file tree
Hide file tree
Showing 31 changed files with 627 additions and 618 deletions.
Expand Up @@ -11,7 +11,8 @@ part of masamune_ads_google.others;
/// [adUnitId]を指定してインタースティシャル広告を表示します。
///
/// [loading]が終了した後、[show]で広告を表示します。
class GoogleAdInterstitial extends ChangeNotifier {
class GoogleAdInterstitial
extends MasamuneControllerBase<void, GoogleAdsMasamuneAdapter> {
/// This class displays interstitial advertisements.
///
/// Display interstitial ads by specifying [adUnitId].
Expand All @@ -24,11 +25,16 @@ class GoogleAdInterstitial extends ChangeNotifier {
///
/// [loading]が終了した後、[show]で広告を表示します。
GoogleAdInterstitial(
this.adUnitId,
) {
this.adUnitId, {
super.adapter,
}) {
_initialize();
}

@override
GoogleAdsMasamuneAdapter get primaryAdapter =>
GoogleAdsMasamuneAdapter.primary;

/// Ad unit ID.
///
/// 広告ユニットID。
Expand Down
Expand Up @@ -11,7 +11,8 @@ part of masamune_ads_google.others;
/// [adUnitId]を指定してインタースティシャル広告を表示します。
///
/// [loading]が終了した後、[show]で広告を表示します。
class GoogleAdRewarded extends ChangeNotifier {
class GoogleAdRewarded
extends MasamuneControllerBase<void, GoogleAdsMasamuneAdapter> {
/// This class displays video ads with rewards.
///
/// Display interstitial ads by specifying [adUnitId].
Expand All @@ -24,11 +25,16 @@ class GoogleAdRewarded extends ChangeNotifier {
///
/// [loading]が終了した後、[show]で広告を表示します。
GoogleAdRewarded(
this.adUnitId,
) {
this.adUnitId, {
super.adapter,
}) {
_initialize();
}

@override
GoogleAdsMasamuneAdapter get primaryAdapter =>
GoogleAdsMasamuneAdapter.primary;

/// Ad unit ID.
///
/// 広告ユニットID。
Expand Down
2 changes: 2 additions & 0 deletions packages/masamune_ads_google/lib/src/others/others.dart
Expand Up @@ -9,6 +9,8 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:masamune/masamune.dart';
import 'package:masamune_ads_google/masamune_ads_google.dart';

part 'google_ads_core.dart';
part 'google_ad_native.dart';
Expand Down
Expand Up @@ -71,7 +71,8 @@ class GoogleAdInterstitial extends ChangeNotifier {
/// [adUnitId]を指定してインタースティシャル広告を表示します。
///
/// [loading]が終了した後、[show]で広告を表示します。
class GoogleAdRewardedInterstitial extends ChangeNotifier {
class GoogleAdRewardedInterstitial
extends MasamuneControllerBase<void, GoogleAdsMasamuneAdapter> {
/// This class displays a rewarded interstitial ad.
///
/// Display interstitial ads by specifying [adUnitId].
Expand All @@ -84,8 +85,13 @@ class GoogleAdRewardedInterstitial extends ChangeNotifier {
///
/// [loading]が終了した後、[show]で広告を表示します。
GoogleAdRewardedInterstitial(
this.adUnitId,
);
this.adUnitId, {
super.adapter,
});

@override
GoogleAdsMasamuneAdapter get primaryAdapter =>
GoogleAdsMasamuneAdapter.primary;

/// Ad unit ID.
///
Expand Down
12 changes: 9 additions & 3 deletions packages/masamune_ads_google/lib/src/web/google_ad_rewarded.dart
Expand Up @@ -11,7 +11,8 @@ part of masamune_ads_google.web;
/// [adUnitId]を指定してインタースティシャル広告を表示します。
///
/// [loading]が終了した後、[show]で広告を表示します。
class GoogleAdRewarded extends ChangeNotifier {
class GoogleAdRewarded
extends MasamuneControllerBase<void, GoogleAdsMasamuneAdapter> {
/// This class displays video ads with rewards.
///
/// Display interstitial ads by specifying [adUnitId].
Expand All @@ -24,8 +25,13 @@ class GoogleAdRewarded extends ChangeNotifier {
///
/// [loading]が終了した後、[show]で広告を表示します。
GoogleAdRewarded(
this.adUnitId,
);
this.adUnitId, {
super.adapter,
});

@override
GoogleAdsMasamuneAdapter get primaryAdapter =>
GoogleAdsMasamuneAdapter.primary;

/// Ad unit ID.
///
Expand Down
1 change: 1 addition & 0 deletions packages/masamune_ads_google/lib/src/web/web.dart
Expand Up @@ -9,6 +9,7 @@ import 'package:flutter/widgets.dart';

// Package imports:
import 'package:masamune/masamune.dart';
import 'package:masamune_ads_google/masamune_ads_google.dart';

part 'google_ads_core.dart';
part 'google_ad_native.dart';
Expand Down

0 comments on commit 04493af

Please sign in to comment.