-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagetype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Is there any lint to avoid dynamic constructor arguments?
class FavoriteFoldersCardWidget extends StatelessWidget {
final TextStyle _h1;
const FavoriteFoldersCardWidget({
super.key,
required h1, // this is dynamic by mistake
}) : _h1 = h1;
@override
Widget build(BuildContext context) {
return Card(
surfaceTintColor: Colors.blue,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Text("hello word", style: _h1),
),
);
}
}Metadata
Metadata
Assignees
Labels
P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagetype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug