Flutter 插件集成指南

Flutter 插件集成

pubspec.yaml ⽂件中添加 bonree_flutter_plugin 插件,⽀持本地依赖

1、本地依赖

dependencies:
  flutter:
    sdk: flutter

  bonree_flutter_plugin:
    path: ./bonree_flutter_plugin //写bonree_flutter_plugin包的本地路径

2、执⾏ flutter packages get 命令

3、iOS 在⼯程ios⽬录下执⾏: pod install

4、引包 替换 runApp()

import 'package:bonree_flutter_plugin/bonree_flutter_plugin.dart';

void main() {
    // runApp(MyApp());// 注释原有的 runApp() ⽅法
    Bonree().start(MyApp());
}

运⾏过程中 flutter 显示如下⽇志标明嵌码成功。

[INFO][BONREE]: bonree_flutter_plugin start success

BonreeSDK 接入

参见帮助中心Android-NativeiOS-Native的接入部分。

results matching ""

    No results matching ""