exelbid_plugin 1.0.0
exelbid_plugin: ^1.0.0 copied to clipboard
Exelbid SDK for Flutter
example/lib/main.dart
import 'package:exelbid_plugin_example/banner_ad.dart';
import 'package:exelbid_plugin_example/interstitial_ad.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Ad Screen Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MainScreen(),
);
}
}
class MainScreen extends StatelessWidget {
const MainScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Main Screen'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const BannerAdWidget()),
);
},
child: const Text('Go to Banner Ad'),
),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InterstitialAdWidget()),
);
},
child: const Text('Go to Interstitial Ad'),
),
],
),
),
);
}
}