iniviteUser method

  1. @override
Future<void> iniviteUser(
  1. List<String> userIdList,
  2. TUICallParams params,
  3. TUIValueCallback callback
)
override

Implementation

@override
Future<void> iniviteUser(List<String> userIdList, TUICallParams params, TUIValueCallback callback) async {
  try {
    if (!kIsWeb && (Platform.isIOS || Platform.isAndroid)) {
      var userIds =
      await methodChannel.invokeMethod(
          "iniviteUser", {'userIdList': userIdList, 'params': params.toJson()});
      callback.onSuccess!(userIds);
    } else {
      callback.onError!(-1, 'This platform is not supported');
    }
  } on PlatformException catch (error) {
    callback.onError!(int.fromEnvironment(error.code), error.message!);
  } on Exception catch (error) {
    callback.onError!(-1, error.toString());
  }
}