FLUTTER ECOSYSTEM

matifdeveloper/fan_easy

FanEasy एक सरल Flutter पैकेज है जो आसानी से Facebook Audience Network विज्ञापनों के समारोह के साथ एकीकरण करता है और उपयोग में आसान तरीके प्रदान करता है।

fan_easy प्रोजेक्ट कवर
Stars
0
Forks
0
अंतिम पुश (UTC)
8 मार्च 2025
प्रोजेक्ट स्थिति
सक्रिय
Muhammad Atif GitHub avatar
GITHUB User

Muhammad Atif ↗

Flutter Developer || Android Developer || iOS Developer || Kotlin Native || Core PHP || SQL || App Publisher || Software Engineer || Google Ads || MVVM || MVC

Gamican Pvt Ltd.Mohallah Janas khel, Village Urmar Payan, Peshawar
भाषाएँDart

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 4 आइटम
  • flutter{"sdk":"flutter"}
  • easy_audience_network^0.0.7
  • flutter_testडेवलपमेंट{"sdk":"flutter"}
  • flutter_lintsडेवलपमेंट^5.0.0

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

FanEasy

FanEasy is a simple and efficient Flutter package for integrating Facebook Audience Network ads seamlessly. It provides easy-to-use methods for loading and displaying various ad formats.

Features

  • Load and show Interstitial Ads
  • Load and show Rewarded Ads
  • Display Banner Ads
  • Display Native Ads
  • Check if ads are loaded

Installation

Add this to your pubspec.yaml file:

dependencies:
  fan_easy: any

Then run:

flutter pub get

Usage

Initialization

Before using any ad feature, initialize the SDK:

import 'package:fan_easy/fan_easy.dart';

void main() {
  FanEasy.instance.loadInit(testingId: "YOUR_TESTING_ID");
}
Load and Show Interstitial Ads
FanEasy.instance.loadInterstitial(placementId: "YOUR_INTERSTITIAL_PLACEMENT_ID");

if (FanEasy.instance.interstitialLoaded) {
  FanEasy.instance.showInterstitial();
}
Load and Show Rewarded Ads
FanEasy.instance.loadRewarded(placementId: "YOUR_REWARDED_PLACEMENT_ID");

if (FanEasy.instance.rewardedLoaded) {
  FanEasy.instance.showRewarded();
}
Display Banner Ads
FanEasy.instance.bannerAd(placementId: "YOUR_BANNER_PLACEMENT_ID")
Display Native Ads
FanEasy.instance.nativeAd(placementId: "YOUR_NATIVE_PLACEMENT_ID")

Example

import 'package:flutter/material.dart';
import 'package:fan_easy/fan_easy.dart';

void main() {
  runApp(MyApp());
  FanEasy.instance.loadInit(testingId: "YOUR_TESTING_ID");
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("FanEasy Example")),
        body: AdExamplePage(),
      ),
    );
  }
}

class AdExamplePage extends StatefulWidget {
  @override
  _AdExamplePageState createState() => _AdExamplePageState();
}

class _AdExamplePageState extends State<AdExamplePage> {
  @override
  void initState() {
    super.initState();
    FanEasy.instance.loadInterstitial(placementId: "YOUR_INTERSTITIAL_PLACEMENT_ID");
    FanEasy.instance.loadRewarded(placementId: "YOUR_REWARDED_PLACEMENT_ID");
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          ElevatedButton(
            onPressed: () => FanEasy.instance.showInterstitial(),
            child: Text("Show Interstitial Ad"),
          ),
          ElevatedButton(
            onPressed: () => FanEasy.instance.showRewarded(),
            child: Text("Show Rewarded Ad"),
          ),
          SizedBox(height: 20),
          FanEasy.instance.bannerAd(placementId: "YOUR_BANNER_PLACEMENT_ID"),
          SizedBox(height: 20),
          FanEasy.instance.nativeAd(placementId: "YOUR_NATIVE_PLACEMENT_ID"),
        ],
      ),
    );
  }
}

License

This package is licensed under the MIT License.