33[ ![ License: MIT] ( https://img.shields.io/badge/Licence-MIT-success.svg )]
44
55Feature manager allows you to hide some unfinished/secret feature from your users, or experiments, that can be managed
6- from remote data source.
6+ from remote data source or local settings.
7+
8+ If you want to use A/B testing or feature toggling with Firebase Remote Config use [ Remote Config Feature Manager] ( https://pub.dev/packages/remote_config_feature_manager )
79
810![ Example 01] ( doc/feature-manager-1.png ) ![ Example 02] ( doc/feature-manager-2.png )
911
@@ -110,15 +112,15 @@ Navigator.of(context).push(
110112### Feature parameters
111113
112114
113- | Parameter | Default | Description |
114- | :------------------------ | :-------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------- |
115- | ** key** * String* | required | This key will be used to store value in local storage. |
116- | ** type** * FeatureType* | ` FeatureType.feature ` | It can be used to separate local features and experiments driven by some remote provider. |
117- | ** valueType** * FeatureValueType* | required | Type of value of the feature. If you need toggle, use ` FeatureValueType.toggle ` |
118- | ** title** * String* | required | Title that will be used inside Developer Preferences Screen. |
119- | ** remoteSourceKey** * String* | | TBD. Used to fetch value from remote source. |
120- | ** description** * String* | | Description that will be used inside Developer Preferences Screen. |
121- | ** value** * Object?* | Null | Stored value of the Feature. Will be fetched from local storage. |
115+ | Parameter | Default | Description |
116+ | :------------------------ | :-------------------------------------------------: | :---------------------------------------------------------------------------------------------|
117+ | ** key** * String* | required | This key will be used to store value in local storage. |
118+ | ** type** * FeatureType* | ` FeatureType.feature ` | It can be used to separate local features and experiments driven by some remote provider. |
119+ | ** valueType** * FeatureValueType* | required | Type of value of the feature. If you need toggle, use ` FeatureValueType.toggle ` |
120+ | ** title** * String* | required | Title that will be used inside Developer Preferences Screen. |
121+ | ** remoteSourceKey** * String* | | Key from remote source. |
122+ | ** description** * String* | | Description that will be used inside Developer Preferences Screen. |
123+ | ** value** * Object?* | Null | Stored value of the Feature. Will be fetched from local storage. |
122124| ** defaultValue** * Object?* | Null | Default value of the Feature. Will be returned by ` FeatureManager ` if stored value is ` Null ` |
123125
124126``` dart
@@ -128,18 +130,5 @@ enum FeatureType { feature, experiment }
128130enum FeatureValueType { text, toggle, doubleNumber, integerNumber, json }
129131```
130132
131- ## Todo
132-
133- - [ ] Use remote sources.
134- - use abstraction to make it easy for anyone to implement new providers like:
135- - custom api config
136- - firebase remote config
137- - amplitude experiments
138- - etc.
139-
140- - [ ] Use permanent notification to access dev settings
141-
142- - [x] Add sync calls of ` isEnabled ` and ` getValue ` for ` FeatureManager `
143-
144133## Contributions
145134Feel free to contact me (
[email protected] ) or create Merge Requests for this repository :)
0 commit comments