adfurikun 1.1.0 copy "adfurikun: ^1.1.0" to clipboard
adfurikun: ^1.1.0 copied to clipboard

outdated

Adfurikun plugin for Flutter apps. Supports Reward, Interstitial, NativeAd, Rectangle and Banner ads.

example/lib/main.dart

import 'package:adfurikun_example/banner_sample.dart';
import 'package:adfurikun_example/interstitial_sample.dart';
import 'package:adfurikun_example/nativead_sample.dart';
import 'package:adfurikun_example/rectangle_sample.dart';
import 'package:adfurikun_example/reward_sample.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(TopApp());
}

class TopApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Adfurikun Sample',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      initialRoute: 'top',
      routes: {
        'top': (context) => TopPage(title: 'Adfurikun Sample'),
        'reward': (context) => RewardPage(),
        'interstitial': (context) => InterstitialPage(),
        'nativead': (context) => NativeAdPage(),
        'rectangle': (context) => RectanglePage(),
        'banner': (context) => BannerPage(),
      },
    );
  }
}

class TopPage extends StatefulWidget {
  TopPage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  TopPageState createState() => TopPageState();
}

class TopPageState extends State<TopPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            FractionallySizedBox(
                widthFactor: 0.9,
                child: ElevatedButton(
                    onPressed: () => Navigator.pushNamed(context, 'reward'),
                    child: Text("Show Reward")
                )
            ),
            FractionallySizedBox(
                widthFactor: 0.9,
                child: ElevatedButton(
                    onPressed: () => Navigator.pushNamed(context, 'interstitial'),
                    child: Text("Show Interstitial")
                )
            ),
            FractionallySizedBox(
                widthFactor: 0.9,
                child: ElevatedButton(
                    onPressed: () => Navigator.pushNamed(context, 'nativead'),
                    child: Text("Show NativeAd")
                )
            ),
            FractionallySizedBox(
                widthFactor: 0.9,
                child: ElevatedButton(
                    onPressed: () => Navigator.pushNamed(context, 'rectangle'),
                    child: Text("Show Rectangle")
                )
            ),
            FractionallySizedBox(
                widthFactor: 0.9,
                child: ElevatedButton(
                    onPressed: () => Navigator.pushNamed(context, 'banner'),
                    child: Text("Show Banner")
                )
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
0
points
222
downloads

Publisher

unverified uploader

Weekly Downloads

Adfurikun plugin for Flutter apps. Supports Reward, Interstitial, NativeAd, Rectangle and Banner ads.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on adfurikun