VariablesPlugin class
A plugin for the Devbar to manage variables.
Descriptor mode as well as widget: it keeps its own tab in the overlay and mirrors every variable to the host as a knob, because a feature flag is a variable and turning one on from the cockpit is what the bridge is for.
- Implemented types
Properties
-
currentVariables
→ List<
DevbarVariable> -
no setter
- devbar → DevbarState
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
overrides
→ Map<
String, dynamic> -
final
- panelId → String
-
Stable, and unique among the plugins of one devbar. Two devbars mounted at
once do not have to coordinate: the bridge disambiguates.
no setteroverride
- panelLabel → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → VariablesStore
-
final
- title → String?
-
Kept, not just consumed: panelLabel names the cockpit's tab with the
same word the overlay's tab uses.
final
-
variables
→ Stream<
List< DevbarVariable> > -
no setter
Methods
-
add<
T> (DevbarVariableDefinition< T> definition, {FeatureFlagValue<T> ? flagValue}) → DevbarVariable<T> -
addVariable<
T> (DevbarVariable< T> variable) → void -
checkbox(
String key, {String? description, bool defaultValue = false}) → DevbarVariable< bool> -
describePanel(
Panel panel) → void -
Declares feeds, states, knobs and actions onto
panel, each with the code that serves it.override -
dispose(
) → void -
override
-
live(
String name) → bool -
Whether anything has declared
namein this run. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
picker<
T> (String key, {String? description, required T defaultValue, required Map< T, String> options, T? fromJson(Object)?}) → DevbarVariable<T> -
remove(
DevbarVariable variable) → void -
slider<
T extends num> (String key, {String? description, required T defaultValue, required T min, required T max, required T step}) → DevbarVariable< T> -
text(
String key, {String? description, String defaultValue = ''}) → DevbarVariable< String> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
init(
{Map< String, dynamic> ? values, VariablesStore? store, Future<VariablesStore> storeFactory()?, FutureOr<String> filePath()?, String? title}) → Future<VariablesPlugin> Function(DevbarState)