安装
feralin_flutter 0.3.0 已在 pub.dev 发布;请用下方命令通过包管理器安装。
dependencies:
feralin_flutter:
path: ../sdks/flutterFuture<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Feralin.initialize(const FeralinConfig(
projectKey: 'pk_live_...', // yalnız x-feralin-project-key başlığında taşınır
collectUrl: 'https://collect.example.com',
// consent verilmezse izin bekleniyor sayılır
));
runApp(const MyApp());
}首次使用
Feralin.track('purchase', {'amount': 10.5});
Feralin.screen('home');
Feralin.identify('kullanici_42'); // PII vermeyin
final result = await Feralin.flush(); // result.status: HTTP durumu, 0: istek yok veya ağ hatası
await Feralin.reset(); // çıkış: kimlikler yenilenir, kuyruk ve global özellikler silinirFeralin.setGlobalProperties({'app_release': '2.4.0'}); // fr_ ile başlamayan her olaya eklenir
Feralin.setUserProperties({'plan': 'pro', 'seats': 12}); // fr_user_properties
Feralin.group('acme-team', {'plan': 'team'}); // fr_group, group_id + özellikler
Feralin.clearGlobalProperties();final open = await Feralin.handleShortLink(uri); // iOS'ta ya da autoCaptureDeepLinks: false iken
navigator.pushNamed(open.destination); // ör. /urun/42final link = await Feralin.consumeDeferredDeepLink();
if (link.status == DeferredDeepLinkStatus.delivered) router.go(link.path!);代码示例原样取自 sdks/flutter/README.md 文件,其中的注释可能是土耳其语。项目密钥由你在控制台中创建。
能力
| 能力 | 状态 |
|---|---|
| 事件发送 | 支持 |
| 批量发送 | 部分支持 |
| 同意管理 | 支持 |
| 身份标识 | 部分支持 |
| 归因 | 部分支持 |
| 深度链接 | 部分支持 |
| 收入 | 部分支持 |
| 错误捕获 | 部分支持 |
| 会话录制 | 不适用 |
| 链路追踪 | 已规划 |
验证链
| 环节 | 状态 |
|---|---|
| 源码 | 通过 |
| 构建 | 通过 |
| 测试 | 通过 |
| 包仓库发布 | 通过 |
| 全新安装 | 通过 |
| 事件回执 | 通过 |
| 文档 | 通过 |
| Super Admin 证据 | 未开始 |
通过指的是本地证据:源码、构建与测试都已运行。包仓库发布与 Super Admin 证据是独立的环节;只要有一个未通过,该 SDK 就不算就绪。