fusionsdk 1.0.6 copy "fusionsdk: ^1.0.6" to clipboard
fusionsdk: ^1.0.6 copied to clipboard

outdated

Fusion Sdk

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:fusionsdk_example/reward_video.dart';
import 'package:fusionsdk_example/interstitial.dart';
import 'banner.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MainPage(),
      routes: <String, WidgetBuilder>{
        '/interstitial': (BuildContext context) => InterstitialPage(),
        '/banner': (BuildContext context) => BannerPage(),
        '/reward-video': (BuildContext context) => RewardVideoPage()
      },
    );
  }
}

class MainPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            MaterialButton(
                minWidth: 180,
                color: Colors.blue,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.of(context).pushNamed('/banner');
                },
                child: Text("Banner 广告")),
            MaterialButton(
                minWidth: 180,
                color: Colors.blue,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.of(context).pushNamed('/interstitial');
                },
                child: Text("插屏广告")),
            MaterialButton(
                minWidth: 180,
                color: Colors.blue,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.of(context).pushNamed('/reward-video');
                },
                child: Text("激励视频广告"))
          ],
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Fusion Sdk

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on fusionsdk