adn_flutter_offerwall 1.0.4 copy "adn_flutter_offerwall: ^1.0.4" to clipboard
adn_flutter_offerwall: ^1.0.4 copied to clipboard

ADN Flutter Offerwall plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:adn_flutter_offerwall/adn_flutter_offerwall_plugin.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

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

  Future<void> initOfferWall() async {
    OfferWall.init();
    OfferWall.setUserId(userId: 'userId');
    OfferWall.setGender(gender: 'M');
    OfferWall.setBirthYear(birthYear: 1992);
  }

  Future<void> showOfferWall() async {
    OfferWall.showOfferWall(title: "Get point");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                child: Text("Show OfferWalls"),
                onPressed: () {
                  showOfferWall();
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
130
pub points
0%
popularity

Publisher

unverified uploader

ADN Flutter Offerwall plugin project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_dotenv

More

Packages that depend on adn_flutter_offerwall