Getters and Setters have been around in a lot of Programming languages. Primarily they are used for setting a value of a private variable inside a Class. Eventhough Dart is not very strict on using a private variable outside the scope like JAVA for example, they are still considered private and not advisable to use outside the scope of a Class.
So the Getters and Setters come to the rescue. These provide simple ways to Get the value of the variable and even set the value of the variable. They make the entire class look cleaner and are definitely required when creating a large business application.
You will learn more about GETTERS & SETTERS in Dart in this video.
Check out all the Files for the series updated here -
Link to my blog -
[ Ссылка ]
Social Media
Follow me on Twitter: [ Ссылка ]
Follow my Facebook: [ Ссылка ] To improve my productivity
Everyday Planner - [ Ссылка ]
Fidget Spinner - [ Ссылка ]
Tech I use
Acer 32 Inch Monitor- [ Ссылка ]
Laptop - MacBook Pro 15 (Primary)
Dell XPS Windows Laptop(Secondary) - [ Ссылка ]
Filming Gears
Canon EOS R - [ Ссылка ]
Maono Au 400 - [ Ссылка ]
Ещё видео!