import 'flutter_umeng_platform_interface.dart';

class FlutterUmeng {
  static Future<void> setPolicyGrantResult(bool granted) {
    return FlutterUmengPlatform.instance.setPolicyGrantResult(granted);
  }

  ///
  ///
  ///androidAppKey 项目可以为空，
  ///重要事项：Android需再主工程的AndroidManifest.xml中配置 ，必须配置，否则无法正常初始化
  /// <meta-data
  /// android:name="UMENG_APPKEY"
  /// android:value="你的友盟AppKey" />
  ///
  ///iosAppKey 项目必填
  ///
  ///
  ///
  ///调用需先调用setPolicyGrantResult同意隐私之后方可初始化
  ///
  static Future<void> initCommon(
      {String? androidAppKey, required String iosAppKey}) {
    return FlutterUmengPlatform.instance
        .initCommon(androidAppKey: androidAppKey, iosAppKey: iosAppKey);
  }
}
