sharetrace_flutter_plugin

一、安装与配置

请先从Sharetrace获取AppKey

Android配置

找到项目的AndroidManifest.xml文件,在<application>...</application>中增加以下配置

    <meta-data
        android:name="com.sharetrace.APP_KEY"
        android:value="填入从Sharetrace获取到的AppKey"/>

iOS配置

在Info.plist中增加以下配置

	<key>com.sharetrace.APP_KEY</key>
	<string>填入从Sharetrace获取到的AppKey</string>

二、接口使用

  1. 导入接口定义
import 'package:sharetrace_flutter_plugin/sharetrace_flutter_plugin.dart';
  1. 定义结果回调
  Future responseHandler(Map<String, String> data) async {
    setState(() {
      result = "code= " + data['code'] + "\n"
           + "msg= " + data['msg'] + "\n"
           + "paramsData= " + data['paramsData'] + "\n"
           + "resumePage= " + data['resumePage'];
    });
  }
  1. 请求获取参数
    SharetraceFlutterPlugin _sharetraceFlutterPlugin = SharetraceFlutterPlugin.getInstance();
    _sharetraceFlutterPlugin.getInstallTrace(responseHandler);

三、导出并测试

通过以上配置后,分别导出Android的apk包和iOS的ipa,登录Sharetrace并根据页面指引完成配置和在线测试。

Libraries

sharetrace_flutter_plugin