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.

Sizin İçin Seçtik  What is the frequency of a electromagnetic wave?

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Sizin İçin Seçtik  Can we pass function as a parameter?

Leave a Reply

Your email address will not be published. Required fields are marked *