'"Use key in widget constructors" warning each time I create a new widget
Solution 1:[1]
add this in your code right before the @override line
const FooPage({Key? key}) : super(key: key);
always add const before the widget command like EdgeInsets, spacer, SizedBox, BorderRadius etc
Solution 2:[2]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jilan Dirgantara |
| Solution 2 | kksal55 |


