mint_admobkit 1.1.1 copy "mint_admobkit: ^1.1.1" to clipboard
mint_admobkit: ^1.1.1 copied to clipboard

The flutter package including a set of AdMob integration utils for MintMinter apps

example/lib/main.dart

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

import 'example_ad_provider.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  ExampleAdProvider.getInstance().initializeMobileAdsOnMobile();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Mint AdMobKit Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('Mint AdMobKit Demo'),
      ),
      body: ListView(
        children: [
          AdBanner(
            padding: const EdgeInsets.symmetric(vertical: 50),
            type: const ExampleTopBannerAndroid(unitId: AdIdProvider.mockAdId),
            adIdProvider: ExampleAdProvider.getInstance(),
          ),
          Container(
            color: Theme.of(context).colorScheme.primaryContainer,
            padding: const EdgeInsets.all(20),
            child: Text(
              'Test Ad Demo',
              style: TextStyle(
                color: Theme.of(context).colorScheme.onPrimaryContainer,
              ),
            ),
          )
        ],
      ),
    );
  }
}
1
likes
0
points
41
downloads

Publisher

verified publishermintminter.com

Weekly Downloads

The flutter package including a set of AdMob integration utils for MintMinter apps

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

equatable, flutter, google_mobile_ads

More

Packages that depend on mint_admobkit