We can use a final keyword to restrict the user. It can be applied in many contexts, such as variables, classes, and methods.
Const keyword is used to declare constant. We cannot change the value of the const keyword after assigning it.
Example :
void main() {
final a = 100;
const pi = 3.14;
print(a);
print(pi);
}
Leave a Reply