Skip to content

Commit ab05c23

Browse files
alignment sliders for help widget example
1 parent 0f5f218 commit ab05c23

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

example/lib/storybook/stories/help_widget_story.dart

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ const testHeight = 420.0;
1010
/// Test width
1111
const testWidth = 420.0;
1212

13-
/// helpWidget alignment
14-
const _alignment = Alignment.bottomRight;
15-
1613
const _listLength = 100;
1714

1815
/// Definition of using 4 different widget inherited from [HelpWidget].
@@ -22,6 +19,22 @@ WidgetbookComponent get helpWidgetStory => WidgetbookComponent(
2219
WidgetbookUseCase(
2320
name: 'First',
2421
builder: (context) {
22+
final alignmentX = context.knobs.slider(
23+
label: 'Alignment on x Axis',
24+
initialValue: -1,
25+
min: -1,
26+
max: 1,
27+
);
28+
29+
final alignmentY = context.knobs.slider(
30+
label: 'Alignment on y Axis',
31+
initialValue: -1,
32+
min: -1,
33+
max: 1,
34+
);
35+
36+
final _alignment = Alignment(alignmentX, alignmentY);
37+
2538
return Container(
2639
alignment: Alignment.center,
2740
color: _backgroundColor,

0 commit comments

Comments
 (0)