createGroup method

Future<Map> createGroup(
  1. dynamic groupInfo,
  2. dynamic userIDs,
  3. dynamic config
)

Implementation

Future<Map<dynamic, dynamic>> createGroup(
    dynamic groupInfo, dynamic userIDs, dynamic config) async {
  Object _groupInfo = mapToJSObj(groupInfo);
  Object _config = mapToJSObj(config);

  final result = await promiseToFuture(
          ZIM.getInstance()!.createGroup(_groupInfo, userIDs, _config))
      .catchError((e) {
    throw PlatformException(code: e.code.toString(), message: e.message);
  });

  Map resultMap = jsObjectToMap(result);

  return resultMap;
}