flutter版蒲公英

蒲公英內測分發:數據統計、原生異常上報、flutter異常上報、應用更新、用戶反饋

項目地址


一、引入

dependencies:
 flutter_pgyer: lastVersion
複製代碼

二、使用

import 'package:flutter_pgyer/flutter_pgyer.dart';

//使用flutter異常上報
void main() => FlutterPgyer.reportException(()=>runApp(MyApp()));

//初始化
FlutterPgyer.init(
        iOSAppId: "appid",
        androidAppId: "appid",
      });

//用戶反饋附帶參數
FlutterPgyer.setEnableFeedback(param: map);

//檢查更新,android用戶獲取更新信息,iOS直接彈窗
//可選參數
//bool autoDownload = false, //android專用,自動下載安裝,沒有交互界面
FlutterPgyer.checkUpdate();

//獲取更新信息
FlutterPgyer.getAppBean().then((appBean){
              print(appBean?.downloadURL);
            });
複製代碼

三、已知問題

1)android由於flutter爲surfaceview,搖一搖反饋截屏圖片會是黑的,官方沒有提供讓用戶自定義生成截屏圖片的方法,暫時無解android

2)iOS異常上報debug不可用,打包ipa沒有測試,若有問題請issuegit

四、控制檯預覽

統計

android異常上報

android反饋

iOS反饋

相關文章
相關標籤/搜索