Lets say I have the following:
var example = SizedBox();
dart then recommends that I add const
before SizedBox
:
var example = const SizedBox();
I understand what the const
keyword does, but what I don't understand is why I have to write it in the example above, since the constructor of SizedBox
is const. Wouldn't all instances of SizedBox
be constant without writing it each time?