Nice! I was waiting so much to use the constructor tear-offs. I got obsessed with clean code practices since I turned on almost every linter rule and the constructors always looked bad without tear-offs.
Wow...I've been using tear offs in callbacks but didn't know. I've heard about the new constructor tear feature in Dart and I've been confused because I didn't know what a tear of was. Thank you for this and thank you Dart team
Thanks for the explanation of a tear-off. I had been wondering what all this hubbub regarding Dart tear-offs was about. I thought... What even is this new concept Dart has created called tear-offs? So now I know that it really is just syntactic sugar which the Dart compiler expands to a closure calling your function. Makes sense, and saves us from having to type a few more braces and parentheses. And we definitely don't need any extra bracing in our Flutter UI code...
Nice done. In case I miss it why are tear-off better then lambda? Is it because of better readability or does it have performance impact. What are the implications, that would nice too, to explain, just for next time. Anyway great video serie
Tear off uses the function object directly, while lambda will create a new function object which will execute the function. Take this with a grain of salt as I assumed it is the same with kotlin (inline function specifically)
3 ปีที่แล้ว +1
Thanks you for your answer. I had same thought 🤣. At least we have a possible explanation for future watchers / readers 😇 - I hope the next time they will decode it directly in the video.
To make the explanation above make more sense! It means whenever a stateful widget updates it state, you are creating new lambda functions too! But using a tear-off, you are just passing the reference which already exists.
Hey flutter team, i was wondering if you can make a episode of "hell ya! Interesting development show" where you just focus on creating beautiful ui. Please🥺
😆 okay I didn't knew what the tear-offs were but I have been using it for long time 😂😂. Well well well, now I know its name too, it's called tear-offs ❤
Hi! I am new to flutter. So a tear off basically removes the unnecessary use of lambdas. So the benefit is: 1. Clean code practice: Supply the function when it needs to be supplied, call a function when it needs to be called. 2. Not using lamda when we can do without using it. I guess, it is memory efficient. Am I right or am I not?
The main benefit is pretty much cleaner code. You have less opening/closing braces/brackets (which Flutter already needs a billion of already!) and less lines to show the same result. You're right that (at least in theory) there's a memory advantage, but a single function has pretty much negligible memory usage on its own, and that's before we consider how the dart compiler probably optimises lambda expressions to save on even more memory anyway!
Hello how the hell flutter handle GDRP? I’m stucked after developing app with flutter. There is no information about how to creat GDRP consent for admob when my app is developed in flutter. Help me. Please
The Show is great but too many animation for this, I mean can you just use minimalism, like compare right and left which is better and which is very good? Thank you Flutter Dart Team.
Nice! I was waiting so much to use the constructor tear-offs. I got obsessed with clean code practices since I turned on almost every linter rule and the constructors always looked bad without tear-offs.
0:43 "Create a tear off when a what now will do?"
I lol'd! Good job explaining this! My mnemonic is that tear-off literally *tears off* the parens.
Wow...I've been using tear offs in callbacks but didn't know. I've heard about the new constructor tear feature in Dart and I've been confused because I didn't know what a tear of was. Thank you for this and thank you Dart team
I love this guys' energy for some reason
Surprisingly I have been using this for a while without knowing it was cool 😅
Great content as always.Thank you Craig and flutter team.
Thanks for the explanation of a tear-off. I had been wondering what all this hubbub regarding Dart tear-offs was about. I thought... What even is this new concept Dart has created called tear-offs? So now I know that it really is just syntactic sugar which the Dart compiler expands to a closure calling your function. Makes sense, and saves us from having to type a few more braces and parentheses. And we definitely don't need any extra bracing in our Flutter UI code...
Learned the terms of the concepts that I use daily
I m going mad abt flutter❤️🔥
Good one! Thanks
Great thumbnail ! 👌
And video, like always
you saved my day👌👌👌👌
Very Nice! I think i Love flutter
Nice done. In case I miss it why are tear-off better then lambda? Is it because of better readability or does it have performance impact. What are the implications, that would nice too, to explain, just for next time. Anyway great video serie
Tear off uses the function object directly, while lambda will create a new function object which will execute the function. Take this with a grain of salt as I assumed it is the same with kotlin (inline function specifically)
Thanks you for your answer. I had same thought 🤣. At least we have a possible explanation for future watchers / readers 😇 - I hope the next time they will decode it directly in the video.
To make the explanation above make more sense!
It means whenever a stateful widget updates it state, you are creating new lambda functions too!
But using a tear-off, you are just passing the reference which already exists.
yes thank you, but why ? is there any benchmark available ?
flawless I will refactor my codes tomorrow
Awesome!! Thanks for sharing
This makes the codebase DRY. Very informative!!
That's not about dry. That's syntax sugar
Hey flutter team, i was wondering if you can make a episode of "hell ya! Interesting development show" where you just focus on creating beautiful ui. Please🥺
I love you guys @ Flutter team
😆 okay I didn't knew what the tear-offs were but I have been using it for long time 😂😂. Well well well, now I know its name too, it's called tear-offs ❤
Thanks ✌️
It's like a method reference in Java.
Impressive thumbnail!
Amazing
Hello My name`s Amin,
I`d like to learn flutter zero to hero.
does anybody know any blog or anything else to learn about Flutter Programming ?
Hi! I am new to flutter. So a tear off basically removes the unnecessary use of lambdas.
So the benefit is:
1. Clean code practice: Supply the function when it needs to be supplied, call a function when it needs to be called.
2. Not using lamda when we can do without using it. I guess, it is memory efficient.
Am I right or am I not?
The main benefit is pretty much cleaner code. You have less opening/closing braces/brackets (which Flutter already needs a billion of already!) and less lines to show the same result.
You're right that (at least in theory) there's a memory advantage, but a single function has pretty much negligible memory usage on its own, and that's before we consider how the dart compiler probably optimises lambda expressions to save on even more memory anyway!
nice
Hello how the hell flutter handle GDRP? I’m stucked after developing app with flutter. There is no information about how to creat GDRP consent for admob when my app is developed in flutter. Help me. Please
Tear-offs work with optional parameters that has n-1 && n != 0.
I always used it but didn't know what its called until now
Someone see CircularLightProgressIndicator widget?
Waiting for video on proper pagination 😳,
YearPicker please
By the way, what you call lambda, i call that anonymous function.
I think Lambda is the original terminology from mathematics, but you're right that they're pretty similar/the same concept.
The Show is great but too many animation for this,
I mean can you just use minimalism, like compare right and left which is better and which is very good?
Thank you Flutter Dart Team.
No I like the format
Please disable automatic translation (at least to Russian). It creates misleading title and uses words with wrong meaning. It looks awful.
Oh no! Thanks for telling us this. Would you mind DMing me on Twitter with some of the details? We aim to have useful translations, not silly ones :)