flutter_attribution_plugin 1.0.2 copy "flutter_attribution_plugin: ^1.0.2" to clipboard
flutter_attribution_plugin: ^1.0.2 copied to clipboard

Flutter plugin providing access to Apple Search Ads Attribution Token (iOS) and Google Play Install Referrer URL (Android).

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_attribution_plugin/flutter_attribution_plugin.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 value = "Loading...";

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

  Future<void> load() async {
    try {
      if (Platform.isIOS) {
        value =
        await AttributionPlugin.getIosAttributionToken();
      } else {
        value =
        await AttributionPlugin.getAndroidReferrerUrl();
      }
    } catch (e) {
      value = e.toString();
    }

    debugPrint(value);

    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text(value),
        ),
      ),
    );
  }
}
0
likes
140
points
34
downloads

Documentation

API reference

Publisher

verified publisherinphinit.space

Weekly Downloads

Flutter plugin providing access to Apple Search Ads Attribution Token (iOS) and Google Play Install Referrer URL (Android).

Homepage
Repository (GitHub)
View/report issues

Topics

#attribution-data #apple-search-ads #attribution-token #install-referrer-url #android

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_attribution_plugin

Packages that implement flutter_attribution_plugin