feature_core 1.2.0 copy "feature_core: ^1.2.0" to clipboard
feature_core: ^1.2.0 copied to clipboard

Dart package for flexible retrieving and managing feature flags.

feature_core #

Manages feature flags in your application. This is the core library.

Additional packages #

There are several additional libraries created to make this one work. I hope this list will be expanded in the future.

  • feature_flutter - integration and management of features in the flutter application.

Wrappers #

Feature sources #

Concept #

There are three main entities:

  • FeatureAbstract represents some kind of customization for the application.

  • FeaturesProvider implements a function that retrieves functions from some repository.

  • FeaturesManager manages your providers and handles their requests to pull.

Usage #

Creating a feature #

To create a feature, just inherit from the FeatureGeneric<T> class.

class UseNewComponent extends FeatureGeneric<bool> {
  const UseNewComponent(bool value) : super(key: 'some_new_component', value: value);
}

Creating a feature provider #

To add your own feature source, inherit from FeatureProvider and implement the pullFeatures() method. The rest is up to you.

Important note: if you need to update the features from within FeatureProvider (for example, if you get updates from the backend), use requestPullFeatures() to reacquire the features.

Creating the manager #

First, create a FeaturesManager and populate it with your sources.

Use with Flutter #

See the feature_flutter package to integrate features into the Flutter application.

6
likes
140
points
60
downloads

Publisher

verified publisherdart.nogipx.dev

Weekly Downloads

Dart package for flexible retrieving and managing feature flags.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, logging, meta, rxdart

More

Packages that depend on feature_core