ContentType
ContentType
Content provides an instance of and entry and query
fetch
This call returns information of a specific content type. It returns the content type schema, but does not include its entries.
| Name | Type | Description |
|---|---|---|
| queryParams | Map<String, dynamic> | The Query Parameters |
import Contentstack
final stack = final contentType = stack.contentType(“content_type_uid”);
final Map queryParameter = {"key": "value"};
queryParameter[“include_snippet_schema”] = true;
queryParameter[“limit”] = 3;
final response = contentType.fetch(queryParameter);entry
This function provide option to get single entry as well as all the entries
| Name | Type | Description |
|---|---|---|
| entry_uid | String | the entry uid |
import Contentstack
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final contentType = stack.contentType();
final entry = contentType.entry(entryUid: 'entry_uid');find
This call returns comprehensive information of all the content types available in a particular stack in your account.
| Name | Type | Description |
|---|---|---|
| queryParam | Map<String, String> | Query parameters |
import Contentstack
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final contentType = stack.contentType().query();
var response = contentType.find();includeGlobalField
This method includes the Global field's schema along with the content type schema.
import Contentstack
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final contentType = stack.contentType().query();
contentType.includeGlobalField()includeCount
This method includes the includeCount method facilitate to find the total count of content types available in your stack.
import Contentstack
final stack = contentstack.stack("apiKey", "delieveryToken", "environment")
final entry = stack.contentType("contentType").entry("uid");
entry.includeCount();