initRangersAppLog static method

void initRangersAppLog(
  1. String appid,
  2. String channel,
  3. bool enableAb,
  4. bool enableEncrypt,
  5. bool enableLog,
  6. String? host,
)

Init SDK,expected to be called as early as possible. Note: You can also choose to init SDK in native side (say, using Java or Objective-C). If so, this method is not expected to be called. @param appid String AppID of Rangers. @param channel String. @host private report URL. e.g. https://myprivateurl.com/ Pass null if you dont know what this is. Usage:(replace 123456 with your appid) RangersApplogFlutterPlugin.initRangersAppLog('123456','test_channel', true, true, false, null);

Implementation

static void initRangersAppLog(String appid, String channel, bool enableAb,
    bool enableEncrypt, bool enableLog, String? host) {
  assert(appid.isNotEmpty);
  assert(channel.isNotEmpty);
  _channel.invokeMethod('initRangersAppLog', {
    "appid": appid,
    "channel": channel,
    "enable_ab": enableAb,
    "enable_encrypt": enableEncrypt,
    "enable_log": enableLog,
    "host": host
  });

  DataObserverManager.init();
}