Both final and const value cannot be modified. Then, what's so different?
Difference between final and const is the 'const' value needs to be a constant value that can be known at the compile-time. On the other hand, 'final' value can be provided at the run-time.
void main() {
String getName() => 'my name';
//const name1 = getName(); //Const variables must be initialized with a constant value.
final name2 = getName();
}