Skip to content

Commit

Permalink
fix: add LabelBuilder missing type param (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoussefRaafatNasry committed Jun 6, 2023
1 parent 40633cd commit 9d455e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/widgetbook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased

- **FIX**: Use related type checks when comparing device's frame state to its query parameter. ([#715](https://github.com/widgetbook/widgetbook/pull/715))
- **FIX**: Add missing type parameter to `LabelBuilder`, which affected the `list` knob. ([#718](https://github.com/widgetbook/widgetbook/pull/718))

## 3.0.0-rc.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class KnobsBuilder {
required String label,
required List<T> options,
String? description,
LabelBuilder? labelBuilder,
LabelBuilder<T>? labelBuilder,
}) {
assert(options.isNotEmpty, 'Must specify at least one option');
return _onKnobAdded(
Expand Down
2 changes: 1 addition & 1 deletion packages/widgetbook/lib/src/knobs/list_knob.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ListKnob<T> extends Knob<T> {
});

final List<T> options;
final LabelBuilder? labelBuilder;
final LabelBuilder<T>? labelBuilder;

@override
List<Field> get fields {
Expand Down

0 comments on commit 9d455e9

Please sign in to comment.