my_target_flutter 0.1.0+3 my_target_flutter: ^0.1.0+3 copied to clipboard
Implementation MyTarget ads SDK.
my_target_flutter #
Flutter plugin to use MyTarget Interstitial ads. MyTarget documentation
SDK version #
MyTarget SDK version, used in plugin:
Minimum requirements #
- iOS 9.0 and higher.
- Android 4.0 and newer (SDK 14).
Getting Started #
- add
my_target_flutter
as a dependency in your pubspec.yaml file; - create an instance of MyTargetFlutter and initialise MyTargetSdk:
import 'package:my_target_flutter/my_target_flutter.dart';
final _plugin = MyTargetFlutter(isDebug: isDebug);
await _plugin.initialize();
- create an instance of InterstitialAd and add an instanse of AdStatusListener to InterstitialAd:
final _interstitialAd = await _plugin.createInterstitialAd(yourSlotId);
_interstitialAd.addListener(AdStatusListener(
onAdLoaded: _onLoaded,
onDisplay: _onDisplay,
onClickOnAD: _onClickOnAD,
onVideoCompleted: _onVideoCompleted,
onDismiss: _onDismiss,
onNoAd: _onNoAd,
));
- show ads when it is loaded:
void _onLoaded() {
_interstitialAd.show();
}
See MyTarget documentation for full information.