Directus Dart

screenshot of Directus Dart

Directus SDK for Dart and Flutter

Overview:

The Directus SDK for Dart/Flutter is an unofficial SDK that provides APIs for working with the Directus headless CMS system. It allows developers to read, create, update, and delete user and system data, as well as handle authentication and access to activity. This SDK is a port of the SDK for JavaScript, with some differences due to the Dart type system.

Features:

  • Installation: Easily add Directus SDK to your Dart/Flutter project by adding it to the dependencies in your pubspec.yaml file.
  • Authentication: APIs for logging in, logging out, and checking if a user is logged in. Also includes methods for enabling and disabling two-factor authentication and requesting password resets.
  • Data Management: Perform CRUD operations on data items, including getting an item by ID, creating single or multiple items, updating items by ID, deleting items by ID, and more.
  • Collections: APIs for working with collections in Directus, including getting items from a collection and managing fields, files, folders, permissions, presets, relations, revisions, roles, server info, settings, users, and more.
  • Utilities: Includes utility methods for generating random strings, generating hashes for values, verifying hash validity, sorting items in a collection, and reverting to previous revisions.

Summary:

The Directus SDK for Dart/Flutter is a powerful tool for developers working with the Directus headless CMS system. With its easy installation process and comprehensive set of features, including authentication, data management, collection management, and utilities, it provides everything needed to build robust and dynamic applications. Whether you are creating a mobile app with Flutter or a web app with Dart, this SDK will streamline your development process and enhance your overall productivity.