---
title: "Contentstack Delivery Dart SDK"
description: "Documentation for Dart Delivery SDK"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/dart/reference"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2025-09-15"
---

# Contentstack Delivery Dart SDK

## Contentstack - Dart Delivery SDK

## Overview

The Dart Content Delivery SDK (contentstack package on pub.dev) is planned for deprecation. We recommend using the [Content Delivery API](/docs/developers/apis/content-delivery-api) for new integrations.

## Dart Delivery SDK for Contentstack

Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application front end, and Contentstack will take care of the rest. [Read More](/docs/developers/sdks/content-delivery-sdk/java/about-java-delivery-sdk).

Contentstack provides Dart Delivery SDK to build applications on top of Dart. Given below is the detailed guide and helpful resources to get started with our Dart Delivery SDK.

## Prerequisite

This guide will help you get started with Contentstack Dart SDK to build Flutter apps powered by Contentstack.

*   [Contentstack account](https://app.contentstack.com/#!/login)
*   [Dart](https://dart.dev/get-dart)

## SDK Installation and Setup

To use the Contentstack Dart SDK with your existing project, perform the following steps:

**Create a New Flutter Project in VS Code**

1.  Open VS Code and select **Extensions** from the left navigation panel. 
2.  Then, in the **Search Extensions in Marketplace** search box, type **Flutter**. From the quick results, click on **Flutter**.
3.  From the **Flutter** details page, click on **Install**. 
4.  Press Ctrl + Shift + P on Windows and Cmd + Shift + P on macOS.
5.  Type **flutter** and select **Flutter: New Project**.
6.  If the Flutter SDK is not installed on your machine, it will ask you to **Download SDK**. Click on it and from the pop-up that opens, click on **Open**.
7.  It will take you the **Flutter install** page. Select as per your OS and the download will begin.
8.  Once it is installed, follow steps 4 and 5 and create a new Flutter project.

**Create a New Project in Android Studio**

1.  Open Android Studio and click on **Configure**. 
2.  Then, select **Plugins**. From the resulting screen, click on **Flutter** and click on **Install**.
3.  Click on **Accept** and then **Yes** to install the Dart plugin.
4.  Click on **Restart** when prompted.
5.  In the Android Studio IDE, click on **Start a new Flutter project** from the **Welcome** screen.
6.  Then, select **Flutter Application** in the menu, and click on **Next**.
7.  On the next screen, give your project a name, provide the Flutter SDK path (where you installed the Flutter SDK), and your project location.
8.  If you prefer publishing the app, set the company domain and click on **Finish**.

**Add Dart Dependencies to Your Project**

To use Contentstack's Dart SDK in your existing project, you need to add the following code within your **pubspec.yaml** file:

```
dependencies:  contentstack: any
```

You can download the latest dependency version [here](https://pub.dev/packages/contentstack).

## Quickstart in 5 mins

## Initializing your SDK

Contentstack offers six [regions](/docs/administration/about-regions) North America (NA), Europe (EU), Azure North America (AZURE\_NA), Azure Europe (AZURE\_EU), GCP North America (GCP\_NA), and GCP Europe (GCP\_EU) as data centers to store customers' account details and data. These regions are independent of each other and therefore have a dedicated set of instructions to use SDKs offered by Contentstack.

To use SDKs for the Europe, Azure NA, Azure EU region, GCP NA, or GCP EU you will have to make certain changes in the configuration of the SDK, as detailed below, and the rest of the instructions remain the same.

Add this to your package's **pubspec.yaml** file:

```
dependencies:   contentstack: ^any
```

To initialize the SDK, enter the stack’s API key, delivery token, and environment name where you will publish the content, as shown in the snippet below:

```
import 'package:contentstack/contentstack.dart' as contentstack;final stack = contentstack.Stack(apiKey, deliveryToken, environment, region: contentstack.Region.<add_your_region>);
```

**Note**: By default, the SDK uses the North American region. Configuration changes are not required for North American region users.

**Refer the below code if you want to use the Europe, Azure North America, Azure Europe, GCP North America region, or GCP Europe.**

```
import 'package:contentstack/contentstack.dart' as contentstack;final stack = contentstack.Stack(apiKey, deliveryToken, environment, region: contentstack.Region.<add_your_region>);
```

Once you have initialized the SDK, you can query entries to fetch the required content.

For Setting the branch for Europe, Azure North America, Azure Europe, GCP North America, or GCP Europe refer the code below:  
  
**For Setting Branch**

```
import 'package:contentstack/contentstack.dart' as contentstack;final stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment', branch: 'branch');
```

## Basic Queries

Contentstack SDKs let you interact with the [Content Delivery APIs](https://www.contentstack.com/docs/developers/apis/content-delivery-api) and retrieve content from Contentstack. They are read-only in nature. The SDKs fetch and deliver content from the nearest server via Fastly, our powerful and robust CDN.

**Get a Single Entry**

To retrieve a single [entry](/docs/headless-cms/about-entries) from a [content type](/docs/headless-cms/about-content-types), use the code snippet given below:

```
import contentstackstack = contentstack.Stack(api_key='api_key', delivery_token='delivery_token', environment='environment')contentType = stack.content_type("content_type_uid")entry = content_type.entry("entry_uid")response = entry.fetch()
```

**Get Multiple Entries**

To retrieve multiple entries of a particular content type, use the code snippet given below:

```
import contentstackstack = contentstack.Stack(api_key='api_key', delivery_token='delivery_token', environment='environment')query = stack.content_type("content_type_uid").query()response = query.find()
```

## Pagination

In a single instance, the [Get Multiple Entries](https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/dart/get-started-with-dart-sdk/#get-multiple-entries) query will **retrieve only the first 100 items** of the specified content type. You can paginate and retrieve the rest of the items in batches using the **skip** and **limit** parameters in subsequent requests. 

```
final stack = contentstack.Stack( "apiKey", "deliveryToken", "environment"); final query = stack.contentType("contentTypeUid").entry().query().skip(20).limit(20);await query.find().then((response){   print(response);}).catchError((onError){   print(onError.message);});
```

## Stack

Stack an instance of ContentType, asset, assetQuery, and sync

## syncToken

In this API request, you need to provide the sync\_token that you received in the last complete sync process. If there are more than 100 records, you will get a pagination\_token instead

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var response = stack.syncToken("syncToken")
```

sync token fetches only the content that was added after your last sync

## sync

The Sync API takes care of syncing your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var response = stack.sync("contentTypeUid", "fromDate", "locale", PublishType.Entry_Published)
```

content type UID. e.g., products This retrieves published entries of specified content type.

Enter the start date. e.g., **2018-08-14T00:00:00.000Z** This retrieves published entries starting from a specific date

Enter locale code. e.g., **en-us** This retrieves published entries of the specific locale

Applicable values are:

*   entry\_published
*   asset\_published
*   entry\_unpublished
*   asset\_unpublished
*   entry\_deleted
*   asset\_deleted
*   content\_type\_deleted

If you do not specify any value, it will bring all published entries and published assets.

## setHost

Adds host for the request

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
stack.setHost("host")                                                                        </span>
```

The host for the API url

## setHeader

adds header using header key and value

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
stack.setHeader("headerKey", "headerValue")                                                                        </span>
```

The header key

the header value

## removeHeader

Remove header using headerKey

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
stack.removeHeader("headerKey")                                                                        </span>
```

The header key

## paginationToken

If the result of the initial sync (or subsequent sync) contains more than 100 records, the response would be paginated. It provides pagination token in the response. However, you do not have to use the pagination token manually to get the next batch, the SDK does that automatically until the sync is complete. Pagination token can be used in case you want to fetch only selected batches. It is especially useful if the sync process is interrupted midway (due to network issues, etc.). In such cases, this token can be used to restart the sync process from where it was interrupted.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var response = stack.paginationToken("paginationToken")                                                                        </span>
```

The pagination token

## imageTransform

The Image Delivery API is used to retrieve, manipulate and/or convert image files of your Contentstack account and deliver it to your web or mobile properties.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var image = stack.imageTransform("imageUrl")                                                                         </span>
```

Base Image Url of the image you want to manipulate

## getContentTypes

ContentType accepts contentTypeId in as the parameter

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var contentType = stack.getContentTypes()
```

ContentType accepts query params as parameter

## contentType

ContentType accepts contentTypeId in as the parameter

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var contentType = stack.contentType("contentTypeId")
```

ContentType accepts contentTypeId as the parameter

## assetQuery

It also returns the content of each asset in JSON format.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var assets = stack.assetQuery()
```

Asset uid

## asset

This call fetches the latest version of a specific. asset of a particular stack.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var asset = stack.asset("uid")
```

Asset uid

## getLivePreview

Live preview of the stack

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var preview = stack.getLivePreview
```

## host

host of the stack

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var host = stack.host
```

## environment

environment of the stack

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var environment = stack.environment
```

## endpoint

endpoint for the api

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var endpoint = stack.endpoint
```

## deliveryToken

delivery token for the stack

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var deliveryToken = stack.deliveryToken
```

## stack

an instance of the stack

```
import Contentstack

final stack = contentstack.Stack(apiKey, deliveryToken, environment);
```

apiKey of the stack

Delivery Token for the stack

Environment of the stack

apiVersion is version of the API

DB region for your stack. You can choose from six regions namely, NA, EU, Azure NA, Azure EU, GCP NA, and GCP EU.

host of the api

live preview for the stack

Client to make API request

## apiKey

apiKey of for the stack

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
var apiKey = stack.apiKey
```

## Stack | Dart Delivery SDK | Contentstack

Stack is the central instance in the Dart Delivery SDK that exposes ContentType, asset, assetQuery, and sync operations for fetching content.

## Asset

The asset provides asset methods

## version

Specify the version number of the asset that you wish to retrieve. If the version is not specified, the details of the latest version will be retrieved..

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final asset = stack.asset("assetUid")..version();
```

## includeFallback

Retrieve the published content of the fallback locale if an entry is not localized in specified locale.

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final asset = stack.asset("assetUid")..includeFallback();
```

## includeDimension

include the dimensions (height and width) of the image in the response. Supported image types: JPG, GIF, PNG, WebP, BMP, TIFF, SVG, and PSD.

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final asset = stack.asset("assetUid")..includeDimension();
```

## environment

To fetch the content based on specific environment

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final asset = stack.asset(asset_uid)..environment('development');
```

The environment

## Asset | Dart Delivery SDK | Contentstack

Asset provides asset methods in the Dart Delivery SDK, giving access to a single media file stored in your Contentstack repository.

## AssetQuery

The AssetQuery provides query on assets

## includeBranch

Included branch in the response.

```
import contentstack
final var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');
final asset = stack.assetQuery()..includeBranch();
```

## version

Specify the version number of the asset that you wish to retrieve.

```
import contentstack
final var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');
final asset = stack.assetQuery()..version(3);
```

## relativeUrls

includes the relative URLs of the assets in the response

```
import contentstack
final var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');final asset = stack.assetQuery()..relativeUrls();
```

## includeFallback

Retrieve the published content of the fallback locale if an entry is not localized in specified locale.

```
import contentstack

final var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');
final asset = stack.assetQuery()..includeFallback();
```

## includeDimension

include the dimensions (height and width) of the image in the response.

```
import contentstack

final var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');final asset = stack.assetQuery()..includeCount();
```

## includeCount

To retrieve the count of entries.

```
import contentstack
var stack = contentstack.Stack('apiKey', 'deliveryToken', 'environment');final asset = stack.assetQuery()..includeCount();
```

## environment

Enter the name of the \[environment\] if you wish to retrieve the assets published in a particular environment.

```
import Contentstack

final stack = final contentType = stack.contentType(“content_type_uid”);
final asset = stack.assetQuery()..environment();
```

The Environment

## AssetQuery | Dart Delivery SDK | Contentstack

AssetQuery provides querying on assets in the Dart Delivery SDK, letting you filter and retrieve media files stored in Contentstack.

## ImageTransformation

ImageTransformation provides Query on image URL

## brightness

The brightness parameter allows you to increase or decrease the intensity with which an image reflects or radiates perceived ligh.

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final imageTransformation = stack.imageTransform(imageUrl).brightness(3)
```

you can also define brightness using any decimal number

## blur

The blur parameter allows you to decrease the focus and clarity of a given image. To specify the extent to which you need to increase the blurriness of an image, use any decimal number (float) between 1 and 1000.

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final imageTransformation = stack.imageTransform(imageUrl).bgBolor('Red')
```

It can accept hexadecimal, combination of (Red, Blue, Green) and (Red, Blue, Green, Alpha)

## bgColor

he bg-color function lets you set a backgroud color for the given image. This is useful when applying padding or for replacing the transparent pixels of an image..

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final imageTransformation = stack.imageTransform(imageUrl).bgBolor('Red')
```

It can accept hexadecimal, combination of (Red, Blue, Green) and (Red, Blue, Green, Alpha)

## auto

Specify the version number of the asset that you wish to retrieve. If the version is not specified, the details of the latest version will be retrieved.

```
import contentstack;

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final imageTransformation = stack.imageTransform(imageUrl).auto(auto: 'webp', format: 'pjpg')
```

auto parameter is set to webp

The format

## ImageTransformation | Dart Delivery SDK | Contentstack

ImageTransformation builds query parameters on an image URL in the Dart Delivery SDK to resize, crop, and otherwise transform Contentstack images.

## 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.

```
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);
```

The Query Parameters

## entry

This function provide option to get single entry as well as all the entries

```
import Contentstack
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final contentType = stack.contentType();
final entry = contentType.entry(entryUid: 'entry_uid');
```

the entry uid

## find

This call returns comprehensive information of all the content types available in a particular stack in your account.

```
import Contentstack
final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final contentType = stack.contentType().query();
var response = contentType.find();
```

Query parameters

## 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();
```

## ContentType | Dart Delivery SDK | Contentstack

ContentType provides Entry and Query instances in the Dart Delivery SDK, serving as the entry point for fetching content of a content type.

## Entry

The Entry provides data based on entry uid

## only

Specifies an array of only keys in BASE object that would be included in the response.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.only(fieldUid);
```

The field uid is list of string

## locale

This method also includes the content type UIDs of the referenced entries returned in the response.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.locale('en-eu');
```

The locale code

## includeReferenceContentTypeUID

This method also includes the content type UIDs of the referenced entries returned in the response.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeReferenceContentTypeUID();
```

## includeReference

Include Reference: When you fetch an entry of a content type that has a reference field, by default, the content of the referred entry is not fetched. It only fetches the UID of the referred entry, along with the content of the specified entry.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeReference("referenceFieldUid", IncludeReference.none(fieldUidList: null));
```

referenceFieldUid Key who has reference to some other class object

includeReference provides three options, none, only and except

## includeBranch

Includes branch in the response

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeBranch();
```

## includeEmbeddedItems

Include Embedded Objects (Entries and Assets) along with entry/entries details

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeEmbeddedItems();
```

## includeFallback

Retrieve the published content of the fallback locale if an entry is not localized in specified locale.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeFallback();
```

## includeContentType

Include Content Type of all returned objects along with objects themselves

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeContentType();
```

## except

Specifies list of field uids that would be excluded from the response.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.except(fieldUid); // fieldUid is list of Strings
```

field uid which get excluded from the response

## addParam

This method adds key and value to an Entry.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.addParam(key, value);
```

The key as string which needs to be added to an Entry

The value as string which needs to be added to an Entry

## Entry | Dart Delivery SDK | Contentstack

Entry provides content data based on an entry UID in the Dart Delivery SDK, giving access to a single Contentstack entry.

## Query

The Query provides entries based on queries applied

## where

Get entries containing the field values matching the condition in the query.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.where("fieldUid", QueryOperation);
```

The field uid

The QueryOperation

## skip

The number of objects to skip before returning any.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.skip(4);
```

No of objects to skip from returned objects

## query

Add a custom query against specified key.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.addQuery("param_key", "param_value");
```

key for the query

value for the query

## param

This method adds key and value to an Entry.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.param("Key", "Value");
```

key by which you can sort the results in descending order

value of the param against the key

## orderByDescending

Sort the results in descending order with the given key.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.orderByDescending("descendingKey");
```

key by which you can sort the results in descending order

## orderByAscending

sort the results in ascending order with the given key.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.ascending("ascKey");
```

key by which you can sort the results in ascending order

## limit

A limit on the number of objects to return.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.limit(2);
```

the count you want to limit your response

## addQuery

Add a custom query against specified key. parameters The key and value pair that will be added to the Query

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.addParams("keyword1", "keyword2", "keyword3");
```

comma-separated string value

## addParams

This method adds key and value to the Query as Query parameter.

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('contentType').entry().query();
query.addParam("Key", "Value")
```

Key of the query parameter

Value of the Query parameter against the key

## includeBranch

includes branch in the response

```
import Contentstack

final stack = contentstack.stack(apiKey, delieveryToken, environment)
final query = stack.contentType('room').entry().query();
query.includeBranch()
```

## whereReference

Get entries having values based on referenced fields This query retrieves all entries that satisfy the query conditions made on referenced fields.

```
import Contentstack
final query = stack.contentType('room').entry().query();
query.referenceSearch('fieldUid', QueryReference.include(query: query));
  await query.find().then((response){
    print(response);
});
```

The referenced uid

It accepts Enum type QueryReference.include() OR QueryReference.NotInclude() and it accepts instance of Query

## setHeader

adds header to the request

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.setHeader("key", "value")
```

key of the header

value of the header against the key

## removeHeader

Removed header from the request by key

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.removeHeader("key")
```

key of the header

## operator

entries that satisfy at least one of the given conditions provided

```
import Contentstack
final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");final query = stack.contentType('contentTypeUid').entry().query();query.operator(QueryOperator.OR);
final stackInstance1 = Credential.stack(); final queryBase1 = stackInstance1.contentType('room').entry().query(); queryBase1.where('title', QueryOperation.equals(value: 'Room 13')); 
final stackInstance2 = Credential.stack(); final queryBase2 = stackInstance2.contentType('room').entry().query(); queryBase2.where('attendee', QueryOperation.equals(value: 20)); 
final List listOfQuery = [queryBase1, queryBase2]; 
query.operator(QueryOperator.or(queryObjects: listOfQuery));
await query.find().then((response)
{ 
  print(response.toString()); 
}).catchError((onError){ 
  print(onError); 
});
```

QueryOperator using and/or functions that accepts list of queries

## only

provides data that contains only mentinoed keywords

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.only(fieldUid);
```

Array of the only reference keys to be included in response

## locale

\[locale\] is the code of the language in which the entries need to be included.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.locale("locale_code");
```

\[locale\] is code of the language of which the entries needs to be included.

## includeReferenceContentTypeUID

This method also includes the content type UIDs of the referenced entries returned in the response

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.includeReferenceContentTypeUID();
```

## includeReference

When you fetch an entry of a content type that has a reference field, by default, the content of the referred entry is not fetched. It only fetches the UID of the referred entry, along with the content of the specified entry

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.includeReference("referenceFieldUid", IncludeReference.except(fieldUidList: fieldUid));;
```

Key who has reference to some other class object

provides three options, none, only and except i.e accepts list of fieldUid

## includeEmbeddedItems

Include Embedded Objects (Entries and Assets) along with entry/entries details

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.includeEmbeddedItems();
```

## includeFallback

Retrieve the published content of the fallback locale if an entry is not localized in specified locale.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.includeFallback();
```

## includeContentType

Include Content Type of all returned objects along with objects

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.includeContentType();
```

## except

Specifies list of field uids that would be excluded from the response. \[fieldUid\] field uid which get excluded from the response.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
query.except(fieldUid);
```

fieldUid is String type of List

## addParam

This method adds key and value to an Entry.

```
import Contentstack

final stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
final query = stack.contentType('contentTypeUid').entry().query();
entry.addParam("key", "value");
```

key of the parameter

value of the param against the key

## Query | Dart Delivery SDK | Contentstack

Query returns entries based on the conditions you apply in the Dart Delivery SDK, letting you filter and fetch content from a content type.