Use the const
keyword when you want to create a compile-time constant.
Note that this value will be immutable.
const color = 'Lava Orange';
color = 'Mexico Blue'; // Error: cannot reassign a const
const colors = ['Lava Orange'];
colors.add('Lava Orange'); // Error: unsupported operation
Use the final
keyword when you want to create a readonly variablae. run-time constant.
Note that you may change properties of the value being pointed to, but you can't change the pointer.
final color = 'Lava Orange';
color = 'Mexico Blue'; // Error: cannot reasign a final
const colors = ['Lava Orange'];
colors.add('Mexico Blue'); // [Lava Orange, Mexico Blue]