yic_attribution_plugin 0.0.2+11 copy "yic_attribution_plugin: ^0.0.2+11" to clipboard
yic_attribution_plugin: ^0.0.2+11 copied to clipboard

PlatformiOS

内部使用归因插件

example/lib/main.dart

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

import 'gdt_attribution_util.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 _message = 'Hello';

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    await Future<void>.delayed(const Duration(milliseconds: 10));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(
          child: InkWell(
            onTap: () {
              setState(() {
                GdtAttributionUtil.gdtStart();
                _message = 'World!';
              });
            },
            child: Text(_message),
          ),
        ),
      ),
    );
  }
}
0
likes
135
points
116
downloads

Publisher

unverified uploader

Weekly Downloads

内部使用归因插件

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on yic_attribution_plugin

Packages that implement yic_attribution_plugin