Type Promotion | Decoding Flutter

preview_player
Показать описание
In this episode of Decoding Flutter, Khanh will discuss how type promotion works in Dart, when to use it, and why it doesn’t work on object properties!



#DecodingFlutter #Flutter #Developer
Рекомендации по теме
Комментарии
Автор

Good info, but also good to remember how messy this can make your code if you rely on it to 'simplify code'. Unless you're working with an annoying API you should always declare types as specific as possible because relying on type promotion is evidently dodgy

merthyr
Автор

tldr, dart can't predict the result through a getter as it could be overriden, so type promotion through a getter doesn't work without first setting to a local variable.

francisgeorge
Автор

Thank you so much for Hindi is really useful info for us...and i am expecting hindi subtitles for all the videos of this you so much....love u guyz

vivekkumar-nbsw
Автор

Excellent explanation! More intermediate to advance concepts please.

thomasmabika
Автор

"Nullable types are a union type of null and its underlying type..."

Wouldn't that mean that technically union types already exist understood in dart?

Probably in the nearest future we see it as a native language feature?

LoneWolf-hgix
Автор

I like the way she's spelling shtring
Great explanation 💞

youssef.elmoumen
Автор

Heads up to Khanh Never gonna give you up! Nguyen

HuntingKingYT
Автор

How does the variable-type followed by a question-mark work? for example when do you want to assign a null via "String?" "int?" vs "late var"?

bennguyen
Автор

Can we Build an Ecommerce Application by using Flutter Madam

kprakash
Автор

What color theme & font of your editor?

cermilbonzo
Автор

That's why I want to forget all of these check and go with functional programming for data and application layer in Flutter app :)

mibi
Автор

type promotion should also infer type without needing to do nested if statement. For example,

if(x != null) return
x.copyWith(...)

vinceramces
Автор

Please give Dart an `if let` functionality like Swift.

philohan
Автор

Pay attention, rickRoll towards the end.

fredgotpub
Автор

C# solves this in a more elegant way:
if(maybeString is string stringForSure){
// do actions with stringForSure inlinly declared variable
}

nicktech
Автор

😂 I thought there was a data type called Promotion

AiDidthis.
Автор

Literally 6 minutes on thing that must be avoided as much as possible in strict typed programming languages... But yeah for niche cases that knowledge is indeed useful

efliedus