aloisdeniel / aloisdeniel/feature_flags
Initialized features cannot be disabled
- Vorherrschende Sprache
- Dart
- Sterne
- 26
- Forks
- 4
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
If a feature string is initialized in the `Feature` widget:
```
return Features(
flags: [FEATURE_ADS],
child: MaterialApp(
```
Then I add a `DebugFeatures` somewhere in the app:
```
...
ElevatedButton(
onPressed: (){
DebugFeatures.show(
context,
availableFeatures: [
Feature(FEATURE_ADS, name: 'Advertisements'),
Feature(FEATURE_PAID, name: 'Paid functions'),
],
);
},
child: Text("Feature Flag Debug"),
)
```
The I cannot change the already initialized feature, it will always stay active, no matter if I click on it.
If I try to programmatically disable it, it also won't work.
```
ElevatedButton(
onPressed: (){
Features.setFeature(
context,
FEATURE_ADS,
false,
);
DebugFeatures.show(
context,
availableFeatures: [
Feature(FEATURE_ADS, name: 'Advertisements'),
Feature(FEATURE_PAID, name: 'Paid functions'),
],
);
},
child: Text("Feature Flag Debug"),
)
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.