Skip to content

Commit a132d40

Browse files
List.generate
1 parent b1c9351 commit a132d40

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

example/lib/storybook/stories/help_widget_story.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ WidgetbookComponent get helpWidgetStory => WidgetbookComponent(
4747
alignment: _alignment,
4848
overlayWidget: HorizontalHelpWidget(),
4949
child: ListView(
50-
children: [
51-
for (var i = 0; i < _listLength; i++)
52-
Text(
53-
i.toString(),
54-
style: const TextStyle(
55-
color: Colors.white,
56-
),
50+
children: List.generate(
51+
_listLength,
52+
(i) => Text(
53+
i.toString(),
54+
style: const TextStyle(
55+
color: Colors.white,
5756
),
58-
],
57+
),
58+
),
5959
),
6060
),
6161
),

0 commit comments

Comments
 (0)