ContentType

View as Markdown

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.

NameTypeDescription
queryParamsMap<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

NameTypeDescription
entry_uidString

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.

NameTypeDescription
queryParamMap<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();