always_specify_parameter_names
Severity | Quick Fix | Options |
---|---|---|
Info | ❌ | ❌ |
Details
DO specify parameter names in function types to enhance code readability and enable IDEs to provide code completion suggestions.
Bad
typedef ItemBuilder = Widget? Function(BuildContext, int);
// IDE's code completion with default parameter names p0, p1, ...
itemBuilder: (p0, p1) {},
Good
typedef ItemBuilder = Widget? Function(BuildContext context, int index);
// IDE's code completion with descriptive parameter names
itemBuilder: (context, index) {},