init method
初始化
preInit
是否预加载 仅支持android
Implementation
Future<bool> init(
{required String androidAppKey,
required String iosAppKey,
String channel = ''}) async {
if (!_supportPlatform) return false;
final bool? state = await _channel.invokeMethod<bool?>(
'init', <String, dynamic>{
'appKey': _isAndroid ? androidAppKey : iosAppKey,
'channel': channel
});
_isInit = state ?? false;
return state ?? false;
}