Тёмный

InheritedModel (Flutter Widget of the Week) 

Google for Developers
Подписаться 2,4 млн
Просмотров 127 тыс.
50% 1

InheritedModel works just like InheritedWidget, except that when descendants inherit from it, they specify which data they care about! InheritedModel also handles rebuilds individually and only when necessary, whether your widget needs to store two colors, or a dozen live network connections. Try it out!
Learn more about InheritedWidget → bit.ly/2zWmmuo
Learn more about InheritedModel → bit.ly/2DnIAZv
Get more tips! → bit.ly/2B8M3vG
Subscribe! → bit.ly/googledevs
This video is also subtitled in Chinese, Indonesian, French, German, Japanese, Korean, Portuguese, and Spanish.

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@Hell2Night
@Hell2Night 5 лет назад
Your video series are gold mines, some widget are hard to find, and you do not always know what you're looking for. Thanks for that, I hope this serie and the 101, will continue.
@galihriskipratama3631
@galihriskipratama3631 3 года назад
its coming from google, the one who makes flutter, ofc it'll have a good and informatic videos about the product
@rjevangelista9769
@rjevangelista9769 4 года назад
I'm familiarizing all flutter widgets by watching *Flutter Widget of the Week* by sequence. I do some little experiment after watching each videos. Now I got stuck to this InhertedModel widget. I'll skip it for now and come back later once I have the deep understanding on Flutter framework. I feel that this widget plays an important role on complex Flutter projects.
@shubhammittal9764
@shubhammittal9764 4 года назад
I think the new Provider package substitutes the need for this widget now for newcomers.
@rjevangelista9769
@rjevangelista9769 4 года назад
@@shubhammittal9764 thanks in advance, I'll note that.
@ValdaXD
@ValdaXD 4 года назад
InheritedModel is really OP if done nicely. You get fine grained control over the rebuilds.
@KevinSheppard
@KevinSheppard 5 лет назад
A bit complicated but I'm sure it'll be clear once I do a practical
@crossfade7112
@crossfade7112 4 года назад
I gave up half way. I will try it another day🙄
@emumair
@emumair 3 года назад
This is sort of difficult to understand on first go. But I'm sure this would prove handy when required.
Год назад
Music and animations make it look fun and easy. But I'm pulling my hair out. Oh well. Just need to keep grinding. I'll get there...
@Murtaza-Shiraz
@Murtaza-Shiraz Год назад
Ah, another state management option. Good to know about it, but I 'll just stick to Provider for now.
@nakshatranahar
@nakshatranahar 5 лет назад
I thought that its really a cool idea of a widget
@user-sl7oc7tg4t
@user-sl7oc7tg4t 2 года назад
This is what I have been looking for!
@nakshatranahar
@nakshatranahar 5 лет назад
nice work google
@gourav7315
@gourav7315 4 года назад
We are waiting for Flutter Web Stable version
@iammusalman
@iammusalman 3 года назад
its stable now . whats your plan to do hanh? :P
@StefanBlosDev
@StefanBlosDev 5 лет назад
Very useful but how does this differ from ScopedModel?
@PascalWelsch
@PascalWelsch 5 лет назад
ScopedModel, like InheritedWidget rebuilds your Widget for any change. InhertitedModel only rebuilds when the "aspect" changes.
@raveeshdotme
@raveeshdotme 5 лет назад
Scoped model solves a different problem. InheritedWidget/InheritedModel ancestors can only subscribe to the data, but not change it(not directly at least). Ancestors of Scoped Model can also change the data they subscribe to.
@sonxuannguyen1207
@sonxuannguyen1207 3 года назад
From the pragmatic state video from Google, Scoped Model: The state of a specific widget A has to be passed down through many descendants to arrive the leaf widget F, then if state changes, myriads in the branch will get rebuilt (but u actually only want the widget F to get rebuilt).
@aarushnagar3062
@aarushnagar3062 5 лет назад
Hey google. India loves you
@baneneba3477
@baneneba3477 2 года назад
is it like to context on react ?
@kirill4531
@kirill4531 4 года назад
Apparently Provider package is recommended over inherited widgets/models
@kirill4531
@kirill4531 4 года назад
@@emilyfortuna2262 build my own provider? Thanks but no)) I fully trust and rely on Rémi Rousselet 😁 P.S. I agree that we need to know how it's built and how such pattern works in Flutter
@ValdaXD
@ValdaXD 4 года назад
Provider and Riverpod are mostly overkill for some apps. And if done badly they can bloat code/affect performance. But if it works for you. Then good ;D
@g46psk
@g46psk 5 лет назад
not really useful to my work since my design is to stay away from the inheritent bloating classes like i used to face in java or c#
@bazoozoo1186
@bazoozoo1186 5 лет назад
it is not about class inheritance at all. nested widgets are not inherited from theirs ancestor container. it is kinda bad name they choose that causes "anti-inheritance seizure" for some people. I think a word like "composite" would be a better match.
@opal6605
@opal6605 5 лет назад
way better than react
@raveeshdotme
@raveeshdotme 5 лет назад
This is new
@lexibigcheese
@lexibigcheese 5 лет назад
0:42 demonetized.
@ShivamJha00
@ShivamJha00 4 года назад
Why?
@lexibigcheese
@lexibigcheese 4 года назад
@@ShivamJha00 it's the demonetized icon, the yellow filled circle with a dollar symbol in the middle.
Далее
Life of a Widget?! | Decoding Flutter
3:00
Просмотров 66 тыс.
Inside Out 2: BABY JOY VS SHIN SONIC
00:19
Просмотров 2,2 млн
9월 15일 💙
1:23:23
Просмотров 1,2 млн
Как мы играем в игры 😂
00:20
Просмотров 156 тыс.
StreamBuilder (Flutter Widget of the Week)
1:40
Просмотров 320 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 712 тыс.
AnimatedList (Flutter Widget of the Week)
2:57
Просмотров 381 тыс.
BuildContext?! | Decoding Flutter
2:40
Просмотров 145 тыс.
Container (Flutter Widget of the Week)
1:55
Просмотров 293 тыс.
React Native vs Flutter - Which should you use?
22:31
Image (Flutter Widget of the Week)
2:16
Просмотров 228 тыс.
SliverList & SliverGrid (Flutter Widget of the Week)
1:26
Animation Basics with Implicit Animations
4:12
Просмотров 130 тыс.
Inside Out 2: BABY JOY VS SHIN SONIC
00:19
Просмотров 2,2 млн