The final keyword in Dart is used to create constants or objects that are immutable in nature. The only difference between the final and const keyword is that final is a runtime-constant , which in turn means that its value can be assigned at runtime instead of the compile-time that we had for the const keyword.
What is difference between const and final in Dart?
The final keyword in Dart is used to create constants or objects that are immutable in nature. The only difference between the final and const keyword is that final is a runtime-constant , which in turn means that its value can be assigned at runtime instead of the compile-time that we had for the const keyword.