flutter_ads 0.4.4
flutter_ads: ^0.4.4 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import './ads_page.dart';
import './home_page.dart';
import './reward_page.dart';
import './splash_page.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  void launchSplash() {
    Navigator.of(context)
        .push(MaterialPageRoute(builder: (context) => SplashPage()));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
      routes: <String, WidgetBuilder>{
        '/splash': (BuildContext context) => new SplashPage(),
        '/nativeads': (BuildContext context) => new AdsPage(),
        '/reward': (BuildContext context) => new RewardPage(),
        '/insert': (BuildContext context) => new RewardPage(),
      },
    );
  }
}