petsHero-AI/lib/core/config/facebook_config.dart
2026-04-28 17:41:36 +08:00

41 lines
1.9 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/foundation.dart';
import '../api/api_config.dart';
/// Facebook / Meta 相关常量与客户端开关。
///
/// **用途**
/// - **Adjust**Meta Install Referrer 归因(配合 [installReferrerDecryptionKey])。
/// - **Facebook App Events**`AdjustEvents` 中通过 `facebook_app_events` 上报自定义事件等。
///
/// **控制台日志**[debugLogs] 为 true 时Dart 侧会打印 FB 事件调试信息(与 [ApiConfig.debugLogs]、
/// `--dart-define=APP_LOG_LEVEL=trace` 对齐release 默认关闭,避免刷屏。
abstract final class FacebookConfig {
/// 是否在 Dart 控制台打印 FB SDK / 埋点相关调试输出。
///
/// `true``kDebugMode` **或** [ApiConfig.debugLogs](含 `APP_LOG_LEVEL=trace` 等)。
static bool get debugLogs => kDebugMode || ApiConfig.debugLogs;
/// Facebook 应用编号Application ID用于 AndroidManifest / Info.plist 元数据等。
static const String appId = '1684216162986495';
/// Facebook **客户端**口令Client Token
///
/// 路径Meta 开发者后台 → 应用 → **设置 → 高级 → 客户端口令**。\
/// 若为空字符串,部分 SDK 初始化可能受限;[hasClientToken] 可用于分支判断。
static const String clientToken = '';
/// Meta / FB **安装广告**引荐来源的解密密钥(与客户端 Client Token 不同)。
///
/// 用于解密加密后的 Install Referrer需在 **Adjust** 控制台 Partner setup → Meta/Facebook 等处配置,
/// 与 Adjust 文档路径一致。
static const String installReferrerDecryptionKey =
'068aff9bac7e8846b94e9fc73d51c7a5ab7c8ac39fe9a2b16d0ff8b74f98f';
/// [clientToken] 是否已配置(非空)。
///
/// **App Secret** 仅用于服务端,切勿打进客户端包。
static bool get hasClientToken => clientToken.isNotEmpty;
}