updateStoryKnobValue<T> method

void updateStoryKnobValue<T>(
  1. String storyKey, {
  2. required String knobKey,
  3. required T newValue,
})

Implementation

void updateStoryKnobValue<T>(
  String storyKey, {
  required String knobKey,
  required T newValue,
}) {
  final updatedKnob = _value[storyKey]![knobKey]!.copyWithValue(
    value: newValue,
  );

  _value = Map.of(_value)..[storyKey]![knobKey] = updatedKnob;

  notifyListeners();
}