only method
inherited
Specifies an array of only keys in BASE object that
would be included in the response.
fieldUid
Array of the only reference keys to be included in response.
EntryQueryable
object, so you can chain this call.
Example:
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final entry = stack.contentType("contentTypeUid").entry("entryUid");
fieldUid is String type of List
entry.only(fieldUid);
Implementation
void only(List<String> fieldUid) {
if (fieldUid != null && fieldUid.isNotEmpty) {
final List referenceArray = [];
for (final item in fieldUid) {
referenceArray.add(item);
}
parameter['only[BASE][]'] = referenceArray.toString();
}
}