{"id":37231300,"url":"https://github.com/contentstack/contentstack-dart","last_synced_at":"2026-01-15T03:42:51.351Z","repository":{"id":43259450,"uuid":"226805681","full_name":"contentstack/contentstack-dart","owner":"contentstack","description":"Dart SDK for Contentstack's Content Delivery API","archived":false,"fork":false,"pushed_at":"2026-01-12T12:34:45.000Z","size":360,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-12T17:57:01.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentstack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-09T06:58:39.000Z","updated_at":"2026-01-12T08:03:14.000Z","dependencies_parsed_at":"2024-04-16T07:23:45.163Z","dependency_job_id":"457a285c-2e1a-4684-8430-35e8d6d503c7","html_url":"https://github.com/contentstack/contentstack-dart","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/contentstack/contentstack-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentstack","download_url":"https://codeload.github.com/contentstack/contentstack-dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-15T03:42:50.728Z","updated_at":"2026-01-15T03:42:51.342Z","avatar_url":"https://github.com/contentstack.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)\n\n## Dart SDK for Contentstack\n\n![version](https://img.shields.io/github/v/release/contentstack/contentstack-dart)\n![Coverage](https://raw.githubusercontent.com/contentstack/contentstack-dart/ae680c33d9efe68938bde585f72b12cca442c7a7/coverage_badge.svg)\n![Dart CI](https://github.com/contentstack/contentstack-dart/workflows/Dart%20CI/badge.svg)\n![dartdoc](https://img.shields.io/badge/dartdoc-latest-\u003cgreen\u003e.svg)\n\n\u003c!-- ![Coverage](https://raw.githubusercontent.com/contentstack/contentstack-dart/master/coverage_badge.svg?sanitize=true) --\u003e\n\n![issues](https://img.shields.io/github/issues/contentstack/contentstack-dart)\n![fork](https://img.shields.io/github/forks/contentstack/contentstack-dart)\n![starts](https://img.shields.io/github/stars/contentstack/contentstack-dart)\n![license](https://img.shields.io/github/license/contentstack/contentstack-dart)\n![tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fcontentstack%2Fcontentstack-dart%2Ftree%2Fdevelopment)\n\nContentstack is a headless CMS with an API-first approach.\nIt is a CMS that developers can use to build powerful cross-platform applications\nin their favorite languages. Build your application frontend, and Contentstack will\ntake care of the rest.\n[Read More](https://www.contentstack.com/).\n\nContentstack provides `Dart SDK` to build application on top of Dart.\nGiven below is the detailed guide and helpful resources to get started with our Dart SDK.\n\n### Prerequisite\n\nYou will need Dart installed on your machine.\nYou can install it from [here](https://dart.dev/get-dart).\n\n### Setup and Installation\n\nTo use the Contentstack Dart SDK to your existing project, perform the `steps` given below:\n\n### **Install Dart Package**\n\n```Dart\ndependencies:\n  contentstack: any\n```\n\n### Key Concepts for using Contentstack\n\n#### Stack\n\nA stack is like a container that holds the content of your app.\nLearn more about [Stacks](https://www.contentstack.com/docs/developers/set-up-stack/about-stack/).\n\n#### Content Type\n\nContent type lets you define the structure or blueprint of a page or a section of your digital property.\nIt is a form-like page that gives Content Managers an interface to input and upload content.\n[Read more](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#content-types).\n\n#### Entry\n\nAn entry is the actual piece of content created using one of the defined content types.\nLearn more about [Entries](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#entries).\n\n#### Asset\n\nAssets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack.\nThese files can be used in multiple entries.\nRead more about [Assets](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#assets).\n\n#### Environment\n\nA publishing environment corresponds to one or more deployment servers or a content delivery\ndestination where the entries need to be published.\nLearn how to work with [Environments](https://www.contentstack.com/docs/developers/set-up-environments/about-environments/).\n\n### Contentstack Dart SDK: 5-minute Quickstart\n\n#### **Initializing your SDK**\n\nTo initialize the SDK, specify application API key, access token, and environment name of the stack\nas shown in the snippet given below (config is optional):\n\n```dart\nimport 'package:contentstack/contentstack.dart' as contentstack;\n\nfinal stack = Contentstack.stack(apiKey, deliveryToken, environment);\n```\n\nTo get the API credentials mentioned above, log in to your Contentstack account and then in your\ntop panel navigation, go to Settings \u0026 Stack to view the API Key and Access Token.\n\n#### Querying content from your stack\n\nTo retrieve a single entry from a content type use the code snippet given below:\n\n```dart\nimport 'package:contentstack/contentstack.dart' as contentstack;\n\nfinal stack = contentstack.Stack(apiKey, deliveryToken, environment);\nfinal entry = stack.contentType('contentTypeUid').entry(entryUid: 'entryUid');\n    await entry.fetch().then((response) {\n        print(response.toString());\n    }).catchError((error) {\n        print(error.message.toString());\n    });\n```\n\n#### Get Multiple Entries\n\nTo retrieve multiple entries of a particular content type, use the code snippet given below:\n\n```dart\nimport 'package:contentstack/contentstack.dart' as contentstack;\n\nfinal stack = contentstack.Stack(apiKey, deliveryToken, environment);\nfinal query = stack.contentType('contentTypeUid').entry().query();\nawait query.find().then((response) {\n        print(response.toString());\n    }).catchError((error) {\n        print(error.message.toString());\n    });\n```\n\n### Advanced Queries\n\nYou can query for content types, entries, assets and more using our dart API Reference.\n[Dart API Reference Doc](https://www.contentstack.com/docs/platforms/dart/api-reference/)\n\n### Working with Images\n\nWe have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize\nthem for your digital properties. It lets you perform a host of other actions such as crop, trim,\nresize, rotate, overlay, and so on.\n\nFor example, if you want to crop an image (with width as 300 and height as 400), you simply need to\nappend query parameters at the end of the image URL,\nsuch as, \u003chttps://images.contentstack.io/v3/assets/download?crop=300,400\u003e.\n\nThere are several more parameters that you can use for your images.\n\n[Read Image Delivery API documentation](https://www.contentstack.com/docs/developers/apis/image-delivery-api/).\n\nYou can use the Image Delivery API functions in this SDK as well. Here are a few examples of its usage in the SDK.\n\n```dart\nimport 'package:contentstack/contentstack.dart' as contentstack;\n\nfinal stack = contentstack.Stack(apiKey, deliveryToken, environment);\nimageTransformation = stack.imageTransform(imageUrl);\n\n##set the image quality to 100\nimageParams = {'quality': 100}\nfinal imageUrl = imageTransformation..canvas(imageParams)..getUrl();\n\n##resize the image by specifying width and height\nimageParams = {'width': 100, 'height': 100}\nfinal response = imageTransformation..canvas(imageParams)..getUrl();\n\n##enable auto optimization for the image\nimageParams = {'auto': 'webp'}\nfinal response = imageTransformation..canvas(imageParams)..getUrl();\n```\n\n### Helpful Links\n\n- [Contentstack Website](https://www.contentstack.com)\n- [Official Documentation](https://contentstack.com/docs)\n- [Content Delivery API Docs](https://www.contentstack.com/docs/developers/apis/content-delivery-api/)\n\n### The MIT License (MIT)\n\nMIT License\n\nCopyright (c) 2012 - 2025\n[Contentstack](https://www.contentstack.com/). All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentstack%2Fcontentstack-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-dart/lists"}