qm_ad_sdk 0.0.2 copy "qm_ad_sdk: ^0.0.2" to clipboard
qm_ad_sdk: ^0.0.2 copied to clipboard

A new Flutter project.

example/lib/main.dart

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

import 'banner.dart';
import 'interstitial.dart';
import 'reward_video.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.grey,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        buttonTheme: ButtonThemeData(minWidth: 200),
      ),
      home: MyHomePage(),
      routes: <String, WidgetBuilder>{
        '/reward-video': (BuildContext context) => RewardVideoPage(),
        '/banner': (BuildContext context) => BannerPage(),
        '/interstitial': (BuildContext context) => InterstitialPage(),
      },
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/reward-video');
                },
                child: Text("激励视频广告")),
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/banner');
                },
                child: Text("Banner 广告")),
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/interstitial');
                },
                child: Text("插屏广告")),
            RaisedButton(
                onPressed: () {
                  QmAdSdk.pushDrawFeedAd('df1');
                },
                child: Text("快手")),
          ],
        ),
      ),
    );
  }
}
0
likes
150
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter project.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on qm_ad_sdk