Closed buehler closed 8 months ago
Hey @ookami-kb I'm really sorry, I totally missed this small issue. I fixed it in my fork, but forgot to merge it back to the upstream of yours.
It is a very small change that allows custom knobs to be added for sure.
Without this change, the following code is not possible:
extension ButtonKnob on KnobsBuilder {
T button<T>({
required String label,
String? description,
required T Function() onTap,
}) =>
addKnob<T>(
Knob<T>(
label: label,
description: description,
knobValue: ButtonKnobValue<T>(onTap: onTap),
),
);
}
Because KnobsBuilder
does not have the definition of "addKnob".
This was missed in my "opening" of the addKnob method. Since the KnobsBuilder does not have the method definition one cannot add custom knobs via custom extension. This adds the method definition to the builder such that custom knobs can be added in the future.