highfivve_advertising 0.0.1 copy "highfivve_advertising: ^0.0.1" to clipboard
highfivve_advertising: ^0.0.1 copied to clipboard

A Flutter plugin to integrate Highfivve GmbH's native highfivve_advertising SDKs for both Android and iOS, enabling you to display various ad formats within your Flutter application.

example/lib/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize the Highfivve SDK
  await HighfivveAdManager.instance.initialize(
    bundleName: 'com.example.app', // Replace with your app's bundle ID
    publisherCode: 'your-publisher-code', // Replace with your publisher code
  );

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Highfivve Ad Example',
      home: HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    final interstitialAd = HighfivveInterstitialAd();

    return Scaffold(
      appBar: AppBar(title: const Text('Highfivve Ad Example')),
      body: Column(
        children: [
          // Show a banner ad
          const HighfivveBannerAdWidget(
            position: 'banner_1',
            pageType: 'home',
          ),
          const Spacer(),
          ElevatedButton(
            onPressed: () async {
              await interstitialAd.load('interstitial_1', pageType: 'home');
              if (interstitialAd.isLoaded) {
                await interstitialAd.show();
              }
            },
            child: const Text('Show Interstitial Ad'),
          ),
        ],
      ),
    );
  }
}
0
likes
0
points
0
downloads

Publisher

verified publisherhighfivve.com

Weekly Downloads

A Flutter plugin to integrate Highfivve GmbH's native highfivve_advertising SDKs for both Android and iOS, enabling you to display various ad formats within your Flutter application.

Homepage

License

unknown (license)

Dependencies

flutter, plugin_platform_interface, rxdart, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on highfivve_advertising

Packages that implement highfivve_advertising