How to manage application states using inherited widgets | Workshop

How to manage application states using inherited widgets | Workshop

Flutter

3 года назад

51,710 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@haroldpepete
@haroldpepete - 25.05.2021 04:38

please, next time make zoom into the code to see it better, i tried to see the video on my phone and it was a bad desicion

Ответить
@DebabrataAcharya93
@DebabrataAcharya93 - 25.05.2021 09:36

Dude, I need to get a new pair of eyes after this video.

Ответить
@building_in_public
@building_in_public - 26.05.2021 12:23

Velocityx package implements the same functionality in simplier form and the bioler plate code is also less , but it is also good to know the behind the scenes

Ответить
@sanderroest9619
@sanderroest9619 - 26.05.2021 17:37

Great video if you want to build a package that needs state without introducing a dependency on another state management package like provider or riverpod.

Ответить
@prashantmaharana3467
@prashantmaharana3467 - 26.05.2021 18:04

Extremely wanted this workshop, thankyou Flutter 💜

Ответить
@xaviersoh
@xaviersoh - 13.08.2021 19:29

Awesome

Ответить
@panchoyarco9804
@panchoyarco9804 - 17.09.2021 08:36

Please explain the reason for using two dots in "_itemsInCart..add(id)" within _handleAddToCart(String id).

The same question applies to "_itemsInCart..remove(id)" within _handleRemoveFromCart(String id).

Using only one dot causes an error: A value of type 'bool' can't be assigned to a variable of type 'Set<String>'

Fine, but WHAT, exactly and precisely, is the meaning of the two dots in this context?

Is this a shortcut for some kind of a cast?

Obvioously, there's something VERY meaningful going on here. Unfortunately, searching the Dart documentation doesn't produce any meaningful information for "two dots" (which are used in cascades with this Note: Strictly speaking, the “double dot” notation for cascades isn’t an operator. It’s just part of the Dart syntax.)

So, the “double dot” notation for cascades inhabits a different context than the context of your _handleAddToCart(String id) and _handleRemoveFromCart(String id).

Please clarify.

Thanks.

Ответить
@panchoyarco9804
@panchoyarco9804 - 18.09.2021 21:25

To be specific: My previous comment applies to your initial code (Step 1), where you use "_itemsInCart..add(id)" within _handleAddToCart(String id).

By the time you get to Step 9 at the end of your workshop, you use the familiar single dot: "AppStateWidget.of(context).addToCart(id);"

So, my question about your  “double dot” notation refers to the syntax that you use in Step 1.

Thank you very much for having written this excellent workshop. In addition to your nice code, you did a great job with the visual design.

Ответить
@markh1791
@markh1791 - 29.09.2021 22:00

Such a valuable topic, and an excellent example-walkthrough. Thank you!

Ответить
@stepanzarubin
@stepanzarubin - 17.01.2022 09:45

What I don't understand is that why need first build an app the way it is not practical. But thank you :)

Ответить
@jilmarxa7869
@jilmarxa7869 - 04.08.2022 23:19

Is InheritedNotifier more efficient with the same pattern? Create a custom valueNotifier around the data class and without the StatefulWidget that exposes the APIs. That would be my guess I'm not sure yet, though..

Ответить
@CaptainOgres
@CaptainOgres - 13.08.2022 04:02

I really hope the dartpad code sample could be updated with more intuitive comments and walk through to decoupled the excercise from this video.

Ответить
@nobutaka2032
@nobutaka2032 - 10.11.2022 03:16

How does this compare to using Riverpod, advantages and disadvantages?

Ответить
@DartMitai
@DartMitai - 15.05.2023 22:10

more Inherited widgets codelabs!

Ответить
@manishkl1
@manishkl1 - 04.12.2023 16:37

it will be very cool and important to have comments // for each line so even a new comer can read and follow through

Ответить
@lucasmullner2191
@lucasmullner2191 - 07.12.2023 23:15

Easy to understand and well structured workshop. Thanks a lot for these valuable insights on state management in Flutter!

Ответить
@L0gwin
@L0gwin - 13.01.2024 09:12

переводчик яндекс браузера его НЕ ПОНИМАЕТ ! УВОЛЬТЕ ЕГО

Ответить
@DartMitai
@DartMitai - 19.03.2024 20:41

delete((

Ответить
@zohaibmunir7231
@zohaibmunir7231 - 10.07.2024 12:18

How can i access the source code of this exercise? Please help me.

Ответить
@brianrue6168
@brianrue6168 - 04.09.2024 22:00

Thank you for putting this together. Something I noticed while developing my flutter application alongside this video was that your "updateShouldNotify" methond on AppStateScope has backwards logic. Rather than using "==" I think it should have been "!=". I wasn't getting updates to my subtree so I had to hunt down what was happening.

Ответить