Structures

Pub package publisher

Structures is a lightweight pure Dart package for business level reactive programming.

It facilitates high-level model abstraction, data flow management, validation, and error handling, streamlining the creation of applications with a distinct separation between logic and UI/services.

Reactivity

Structures offers the following key features:

  1. Event-Driven Capabilities: Structures enables efficient processing of events, whether they're triggered by user interactions, system occurrences, or other external inputs.

  2. Observability: It allows for easy observation of state or data changes, enabling swift and seamless reactions to these changes.

  3. Asynchronous Programming Support: Structures accommodates asynchronous tasks that can run independently or in parallel, providing robust mechanisms to manage the completion of these tasks.

  4. Data Binding: In the context of UI development, Structures facilitates automatic synchronization between the model (underlying data) and the view (user interface), ensuring real-time consistency.

Please note that these features are framed in the context of the term "reactivity", which is central to the design and functionality of Structures.

The following classes are simple yet powerful and can be used to build responsive and efficient applications.

Name Description Status
Live A listenable (observable) interface class that you use to create objects that you can observe for changes. ✅✅✅
Value A listenable value interface class that you use to create objects that you can observe for value updates. ✅✅✅
Notifier A Live implementation that enables you use to create objects that you can observe for for changes. ✅✅✅
LiveValue Implementation of Value interface ✅✅✅
LiveIterableValue Implementation of Value extension interface for Iterable ✅✅✅
BoolValue Implementation of Value interface for bool ✅✅✅
LiveMapValue Implementation of Value extension interface for Map<K, V> ✅✅✅

Validation

The package provides a set of validation types and structures that can help validate data in any application.

Name Description Status
Failure A representation of a failed Validation ✅✅☑️
FailureType An object containing trace of the failure and other necessary source metadata ✅✅☑️

Collections

The package provides a set of collection types and structures that can help manage data in any application.

Name Description Status
Choice This is fixed-length single choice Choice List ✅✅✅
Pair A pair of two objects ✅✅☑️
AList An extension of a List ✅✅✅
AStringListExtension Extension methods for the List<String> class. ✅✅
IndexedIterableExtension High order Extension methods for the Iterable<T> class. ✅✅

Models

The package provides a set of data types and structures that can help manage data in any application.

Name Description Status
ModelFactory Adapter for simple serialization and converting of model objects to other forms. ✅✅✅
Field A a model of a domain field entry object. ✅✅✅
Named An interface that defines an object that can be named. ✅✅✅
Either A union type that represents two possible types. ✅✅✅
Model A base class for all model objects. ✅✅✅

UI State/Logic Structures

Data structures that drive the data need and logic of UI. Help you handle common UI state like forms, selection etc.

Name Description Status
ThemeModel A model that holds the current theme of the application. ✅✅✅
Field A a model of a domain field entry object. ✅✅✅

Extensions

Extension methods for the dart core classes. There many common tasks that you need to perform on the core classes in the dart core library. This package provides a set of extension methods that can help you perform these tasks.

Name Description Status
StringCaseExtension Extension methods for the String class. ✅✅

Libraries

structures
All commonly used standalone data structures and utility classes and extensions.

This library is a collection of data structures and utility classes and extensions that are commonly used in the development of applications.

The library is divided into the following sections: