getByIds method

Future<List<QBCustomObject?>> getByIds(
  1. String className,
  2. List<String> ids
)

Implementation

Future<List<QBCustomObject?>> getByIds(String className, List<String> ids) async {
  Map<String, Object> data = Map();

  data["className"] = className;
  data["objectsIds"] = ids;

  List<Object?> list = await _customObjectsModule.invokeMethod(GET_BY_IDS_METHOD, data);

  List<QBCustomObject?> customObjects = [];

  for (final item in list) {
    QBCustomObject? customObject = QBCustomObjectMapper.mapToQBCustomObject(item as Map<dynamic, dynamic>);
    customObjects.add(customObject);
  }

  return customObjects;
}