No video

Flutter:Dart copyWith method

  Рет қаралды 4,323

dbestech

dbestech

Жыл бұрын

Flutter and Dart copyWith method and how it works.
copyWith() method creates immutable object. Which means you can not destroy or edit the object you create. One of the way to understand why it's immutable, you can understand from the constructor modifer const. If you put const modifier, it becomes immutable which means you won't be able to edit it.
Another thing why copyWith() method returns immtuable object is that you see, all of our fields are final. If all the fields are final and constructor has const modifier, the return object must be immutable.
Immutable objects are safe and easy to pass around. If you pass around immutable object, you don't need to worry that, they will be editted.
Because nobody can edit them. So this is very safe for saving or recoding or storing data. That's how our chat state also becomes safe.
Course that uses copy with method extensively
www.dbestech.com/tutorials/on...

Пікірлер: 13
@pravinprince3221
@pravinprince3221 Жыл бұрын
Thank you for the wonderful video sir it is very helpful for me and my team, Thanks again sir I love your way of teaching sir thank you
@dbestech
@dbestech Жыл бұрын
All the best
@leleemagnu6831
@leleemagnu6831 Жыл бұрын
Very good explanation. Thank you!
@dbestech
@dbestech Жыл бұрын
Most welcome
@kamil_supabase_enjoyer
@kamil_supabase_enjoyer Жыл бұрын
@dbestech
@dbestech Жыл бұрын
Thanksn
@adaada8008
@adaada8008 Жыл бұрын
Hi, thank you for your video series :) As for continuation of Bloc topics could you enlighten any examples of usage blocWhen vs BlocSelector and if there was covered 'lazy' flag, then maybe 'listen' property aswell? :)
@FLUTTER_HUB
@FLUTTER_HUB 8 ай бұрын
thanks
@dbestech
@dbestech 8 ай бұрын
Welcome
@belostone6623
@belostone6623 Жыл бұрын
Macha allah brother thank you
@dbestech
@dbestech Жыл бұрын
Thank you too
@hellonishant
@hellonishant 4 ай бұрын
thanks
@dbestech
@dbestech 4 ай бұрын
You're welcome!
Dart const, final and immutability
9:59
dbestech
Рет қаралды 1,7 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 38 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 34 МЛН
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 38 М.
What's New in Dart 3?
30:09
Rivaan Ranawat
Рет қаралды 28 М.
Widget Life Cycle in Flutter Explained | Flutter Basics
10:21
Rivaan Ranawat
Рет қаралды 8 М.
35 Flutter Tips That Will Change Your Life
10:53
Flutter Mapp
Рет қаралды 298 М.
Catch Exceptions in Flutter Like Never Before!
9:02
Rivaan Ranawat
Рет қаралды 20 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 264 М.
Flutter Bloc [основы #2] MultiBlocProvider | copyWith
21:33
что-то про flutter
Рет қаралды 10 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 38 МЛН