搜索插件、代码仓与 APP 分类

GitHub 代码仓Vungle/Flutter-Plugin

Flutter-插件

新的 Flutter 项目

Flutter-插件 项目封面
星标
8
复刻
6
最近推送(UTC)
2023年2月15日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

vungle

A plugin for Flutter that supports loading and displaying interstitial and rewarded video ads using the Vungle SDK API.

Note: This plugin is in beta, and may still have a few issues and missing APIs. Feedback and Pull Requests are welcome.

Getting Started

Please go to the Vungle website to create account for your apps at first. You need add your apps there and you will get the app id and placement ids, then use this plugin in your flutter app to do the monetization.

Initialize the plugin
if (Platfrom.isAndroid) {
  Vungle.init('[vungle_android_app_id]');
} else {
  // for iOS
  Vungle.init('[vungle_ios_app_id]');
}

// You need wait until the plugin initialized to load and show ads
Vungle.onInitializeListener = () {
  // The plugin initialized, can load ads for now
}

Load Interstitial or rewarded video ads
Vungle.loadAd('[vungle_placement_id]');

// To know if the ad loaded
Vungle.onAdPlayableListener = (placementId, playable) {
  if(playable) {
    // The ad has been loaded, could play it for now.
  }
}
Play Interstitial or rewarded video ads
if(Vungle.isAdPlayable('[your_placement_id]') {
  Vungle.playAd(placementId);
}

Vungle.onAdStartedListener = (placementId) {
  // Ad started to play
}

// Deprecated. Please use OnAdEndListener
Vungle.onAdFinishedListener = (placementId, isCTAClicked, isCompletedView) {
  // Ad finished to play
  // isCTAClicked - User has clicked the `download` button
  // isCompletedView - User has viewed the video ad completely
  
}

Vungle.OnAdEndListener = (placementId) {
  // If implemented, this method gets called when a Vungle Ad Unit has been completely dismissed.
}

Vungle.OnAdViewedListener = (placementId) {
  // If implemented, this will be called when the ad is first rendered for the specified placement.
}

Vungle.OnAdClickedListener = (placementId) {
  // If implemented, this method gets called when user clicks the Vungle Ad.
}

Vungle.OnAdRewardedListener = (placementId) {
  // This method is called when the user should be rewarded for watching a Rewarded Video Ad.
  // At this point, it's recommended to reward the user.
}

Vungle.OnAdLeftApplicationListener = (placementId) {
  // If implemented, this method gets called when user taps the Vungle Ad
  // which will cause them to leave the current application(e.g. the ad action
  // opens the iTunes store, Mobile Safari, etc).
}

Vungle GitHub avatar
GitHub 作者

Vungle ↗

San Francisco, CA官方网站 ↗
语言DartJavaObjective-CRubyShell

此仓库发布的插件

使用的依赖

依赖清单 2 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗