Tear-offs | Decoding Flutter

preview_player
Показать описание
In this episode, Craig Labenz decodes what a tear-off is and how to use them to streamline your code. Never heard of a tear-off? No worries - you're in the right place!



#DecodingFlutter #Flutter #Developer


product: Flutter - Development - User interface;
Рекомендации по теме
Комментарии
Автор

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.

filiphracek
Автор

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.

hyungtaecf
Автор

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

codegambit
Автор

Surprisingly I have been using this for a while without knowing it was cool 😅

ezeaguprincewill
Автор

I love this guys' energy for some reason

julius
Автор

Great content as always.Thank you Craig and flutter team.

ivanyoed
Автор

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...

pchasco
Автор

Learned the terms of the concepts that I use daily

UsamaKarim
Автор

Great thumbnail ! 👌

And video, like always

laudijksterhuis
Автор

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🥺

ramagrawal
Автор

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

Автор

flawless I will refactor my codes tomorrow

eldadario
Автор

😆 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 ❤

shehzadahmad
Автор

This makes the codebase DRY. Very informative!!

abdulazeezoshinowo
Автор

It's like a method reference in Java.

RawPeds
Автор

But if you have to pass some input to the method then in that case you will have to use lambda instead of tear off, correct?

gofudgeyourselves
Автор

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?

muntasir
Автор

Tear-offs work with optional parameters that has n-1 && n != 0.

vinceramcesoliveros
Автор

I always used it but didn't know what its called until now

mehmetedex
Автор

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 ?

amin.kh