One of the first things explained in most tutorials is the declaration of variables. In Dart, you could declare those with const, final, dynamic, var, and by using the type itself; but what are their differences and when should we use each one?
In this video I'll try to define each of them and give you some tips to know which one to use depending on the context.
🔔 Subscribe to my channel to see more videos like this:
/ @davidserranoio
📖 Useful resources:
- "Flutter: Performance analysis of `const` constructor" by Crizant Lai:
/ flutter-performance-an...
- Dart language tour:
dart.dev/guides/language/lang...
🔤 Text version of the video:
davidserrano.io/const-final-d...
🔵 Follow me for more content like this:
davidserrano.io/
/ svprdga
hashnode.com/@svprdga
dev.to/svprdga
mastodon.social/@svprdga
⏳ Timecodes:
00:00 - Introduction
00:28 - var
01:58 - dynamic
03:00 - final
03:36 - const
04:24 - const in the context of Flutter
04:56 - Final words
13 июл 2024