-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
good first issueGood for newcomersGood for newcomerspreviewRelated to the Monarch Preview Window or monarch packageRelated to the Monarch Preview Window or monarch package
Description
Story functions are simple functions that return a Widget and take zero arguments. Their type is Widget Function().
The stories files may have functions which are not stories, i.e. functions which take parameters. Unfortunately, the code generation builders think they are candidates for story functions. Thus, they process them and they fail with an unhelpful error message.
The builders should detect these non-story functions and ignore them.
Here are some sample functions which generate error messages:
/// Function with one argument
Widget textWidget(Color textColor) =>
Text('I am a Text widget', style: TextStyle(color: textColor));
/// Private function
Widget _textWidget(Color textColor) =>
Text('I am a Text widget', style: TextStyle(color: textColor));
/// Function that returns a text widget
Text textWidget(Color textColor) =>
Text('I am a Text widget', style: TextStyle(color: textColor));
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerspreviewRelated to the Monarch Preview Window or monarch packageRelated to the Monarch Preview Window or monarch package