flutter_install_referer 0.9.3 copy "flutter_install_referer: ^0.9.3" to clipboard
flutter_install_referer: ^0.9.3 copied to clipboard

This package if build for flutter to get install referer, such as channel info, install referer, downlaod time, and any other custom info that you want.

example/lib/main.dart

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

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Map _refererInfo;

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

  Future<void> initPlatformState() async {
    Map<String,dynamic> refererInfo;
    try {
      refererInfo = await FlutterInstallReferer.installReferer;
    } on PlatformException {
      refererInfo = Map();
    }

    if (!mounted) return;

    setState(() {
      _refererInfo = refererInfo;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('flutter_install_referer'),
        ),
        body: Center(
          child: Text('Referer Info: \n$_refererInfo'),
        ),
      ),
    );
  }
}
4
likes
40
pub points
0%
popularity

Publisher

unverified uploader

This package if build for flutter to get install referer, such as channel info, install referer, downlaod time, and any other custom info that you want.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_install_referer