get method
Implementation
Future<List<QBCustomObject?>> get(String className,
{QBSort? sort,
QBFilter? filter,
int limit = 100,
int skip = 0,
List<String>? exclude,
List<String>? include}) async {
Map<String, Object> data = Map();
data["className"] = className;
data["limit"] = limit;
data["skip"] = skip;
if (sort != null) {
data["sort"] = QBSortMapper.sortToMap(sort)!;
}
if (filter != null) {
data["filter"] = QBFilterMapper.filterToMap(filter)!;
}
if (include != null) {
data["include"] = include;
}
if (exclude != null) {
data["exclude"] = exclude;
}
List<Object?> list = await _customObjectsModule.invokeMethod(GET_METHOD, data);
List<QBCustomObject?> customObjects = [];
for (final item in list) {
QBCustomObject? customObject = QBCustomObjectMapper.mapToQBCustomObject(item as Map<dynamic, dynamic>);
customObjects.add(customObject);
}
return customObjects;
}