DEV Community

loading...

Discussion on: Flutter Performance Tips (#1): const constructors

Collapse
pedromassango profile image
Pedro Massango Author

In short, because when you mark the top-most widget in the tree with a const keyword, all its inner widgets will also use a const constructor, so there is no need to add those extra const keywords. If a inner widget does not have a const constructor, then your code won't compile.