register function

Future<bool> register({
  1. required String iosAppId,
  2. required String androidAppId,
  3. bool? useTextureView,
  4. required String appName,
  5. bool? allowShowNotify,
  6. bool? allowShowPageWhenScreenLock,
  7. bool? debug,
  8. bool? supportMultiProcess,
  9. List<int>? directDownloadNetworkType,
})

sdk注册初始化

Implementation

Future<bool> register({
  required String iosAppId,
  required String androidAppId,
  bool? useTextureView,
  required String appName,
  bool? allowShowNotify,
  bool? allowShowPageWhenScreenLock,
  bool? debug,
  bool? supportMultiProcess,
  List<int>? directDownloadNetworkType,
}) async {
  return await _channel.invokeMethod("register", {
    "iosAppId": iosAppId,
    "androidAppId": androidAppId,
    "useTextureView": useTextureView ?? false,
    "appName": appName,
    "allowShowNotify": allowShowNotify ?? true,
    "allowShowPageWhenScreenLock": allowShowPageWhenScreenLock ?? false,
    "debug": debug ?? false,
    "supportMultiProcess": supportMultiProcess ?? false,
    "directDownloadNetworkType": directDownloadNetworkType != null &&
            directDownloadNetworkType.length > 0
        ? directDownloadNetworkType
        : [
            NETWORK_STATE_MOBILE,
            NETWORK_STATE_2G,
            NETWORK_STATE_3G,
            NETWORK_STATE_4G,
            NETWORK_STATE_WIFI
          ]
  });
}