init method
Implementation
@override
Future<TUIResult> init(int sdkAppID, String userId, String userSig) async {
try {
if (!kIsWeb && (Platform.isIOS || Platform.isAndroid)) {
await methodChannel.invokeMethod(
"init", {'sdkAppID': sdkAppID, 'userId': userId, 'userSig': userSig});
} else {
return TUIResult(code: "-1", message: 'This platform is not supported');
}
} on PlatformException catch (error) {
return TUIResult(code: error.code, message: error.message);
} on Exception catch (error) {
return TUIResult(code: "-1", message: error.toString());
}
return TUIResult(code: "", message: "init success");
}