Functions (With Optional & Required Parameters) - Flutter | Dart ~ Episode 1.4

120 Просмотры
Издатель
Hey Coders! I like to think of functions similar to variables when coding in Dart. The difference is when creating a variable, you are storing a single piece of data to be used at a later time. When you create a function, you store an entire code block to be run later down in your code. Why store a block of code as a function instead of just running it immediately when you need it? There will be times when you need to run that section of code many times, and storing it as a function enhances its reusability, not to mention the code's overall readability. In this video, we'll examine how to make functions in Dart, accepting optional and required parameters, and lambda functions.

Check out the source code on GitHub:
https://github.com/davidtheweiss/Flutter-Season-1-Dart

❤️ Support the ongoing growth of this channel, get exclusive perks, and receive consultation on your projects! https://www.patreon.com/DavidWeissProgramming

Категория
Язык программирования Dart
Комментариев нет.