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

PlatformiOS

Plugins used to push each other

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:sk_overlay/sk_overlay.dart';

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

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

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

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  final _skOverlayPlugin = SkOverlay();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: GestureDetector(
              onTap: () async {
                try {
                  await _skOverlayPlugin.displaySKOverlay(
                      appID: '1581732727',
                      failCallback: () {
                        print(111111);
                      },
                      startPresentationCallback: () {
                        print(22222);
                      },
                      didFinishPresentationCallback: () {
                        print(3333);
                      },
                      willStartDismissalCallback: () {
                        print(4444);
                      },
                      didFinishDismissalCallback: () {
                        print(5555);
                      });
                } on PlatformException {}
              },
              child: SizedBox(
                  width: 100,
                  height: 100,
                  child: Text('Running on: $_platformVersion\n'))),
        ),
      ),
    );
  }
}
0
likes
120
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

Plugins used to push each other

Homepage
Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on sk_overlay

Packages that implement sk_overlay