Pragmatic State Management Using Provider (The Boring Flutter Development Show, Ep. 24)

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 124

  • @easyflamer
    @easyflamer 5 лет назад +90

    I'd love for there to be another Boring Show with working on provider from scratch

  • @WikiPeoples
    @WikiPeoples 5 лет назад +23

    I love this show. 1) I am able to learn a lot while watching it. The context you get from watching you guys think about why/when to use a certain technique is really valuable and you don't get that in little snippet videos. 2) It's really reassuring to see you guys actually have to "think" about what to use. In the world of hyper-editted videos, it's easy for someone to come off as having zero struggle or thought process. Seeing you guys take a pause to consider the implementation is a nice reflection of the reality of programming - we're not just typing hundreds of lines of code every minute, flawlessly slamming out the perfect implementation.

  • @sarusethi987654321
    @sarusethi987654321 5 лет назад +84

    Please do a show on State Management again. This was not informative at all. Demonstration of any architecture with an app that has 1-2 screens is easy. But how will the architecture scale in medium to large scale apps. We would love to hear what architecture solutions are used by big apps such as Google Ads, Hamilton, Reflectly etc.

    • @dangggdennis
      @dangggdennis 5 лет назад +1

      I agree that seeing some deep examples would be helpful, but paradigms and architecture that work for large scale apps may often be overkill for small to medium scale apps. But hey, not saying your app isn’t large scale.

    • @1234zaptor
      @1234zaptor 3 года назад

      @@hoodedferret can u provide a link?.

  • @vkhooda24
    @vkhooda24 5 лет назад +1

    That's exactly what I was looking for where refactor code having bloc pattern to provider pattern. It's really a very nice vblog on state management using provider. Though it names boring flutter development, in actual it was very interesting and I really enjoyed it. There was much learning along with the provider implementation. Thank you Flutter team, of course, Matt and Filip.

  • @mikeyinger4204
    @mikeyinger4204 2 года назад

    This stands the test of time. I laughed out loud a lot, especially in the beginning. Thanks for just wading into it and demonstrating good coding practice during realtime refactoring. I came here because my page keeps getting the MyApp's MaterialApp's context and then can't see the Providers that reside lower in the tree. Anyway, now I'm gonna watch it again.

  • @tripathiabhay1
    @tripathiabhay1 4 года назад +4

    Having some friendship with RxJs and RxJava, This episode was an interesting one to me among many others. You guys are great. One Request - Please create an another episode on providers for medium to large application from scratch with some detailed info on it.

  • @Mohamedhassan-if8ww
    @Mohamedhassan-if8ww 5 лет назад +3

    the best show ever . better than netflix

  • @2c7s
    @2c7s 5 лет назад +1

    It's not often that I feel so good after watching the notification for a "boring show".

    • @2c7s
      @2c7s 5 лет назад

      Once it was for the boring company.

  • @onetdev
    @onetdev 5 лет назад +10

    I love to see you guys struggle as much as I do (as a flutter newbie).

    • @filiphracek
      @filiphracek 5 лет назад +4

      Software development is hard (like most things that are worth doing, imho). Glad this show is useful to you! Once you're expert, please don't forget to give back - show the next wave of newbies that even when you're expert, these things can be hard, and that's okay. Cheers!

  • @markusmcgee
    @markusmcgee 4 года назад

    Good paired programming. Need more videos like this. Off the cuff and trying to fix things on the fly.

  • @MitchellWongHo
    @MitchellWongHo 5 лет назад +6

    Apart from the excellent content, I ❤️ Matt's t-shirt

  • @SreekanthKrishnan
    @SreekanthKrishnan 5 лет назад

    Thanks for such a boring show 😆. Have been waiting for this topic. Hope you'll continue on this in next episode.
    I think you guys should try live boring show so that we can also participate.

  • @oliverbytes
    @oliverbytes 5 лет назад +1

    Thanks guys!!! Officially switched to provider from scoped_model!! Thanks flutter team

  • @peterphillip99
    @peterphillip99 5 лет назад

    Watched your conference guys, and that was great. I used provider on my app. It was simple to implement and made so much sense. Looking forward to watching this one

  • @michelonwordi3202
    @michelonwordi3202 5 лет назад +2

    I need that dart t-shirt Matt's rockin.

  • @rbp365
    @rbp365 5 лет назад

    that dart side T-shirt is kicking all kinds of asses

  • @youkokaku
    @youkokaku 5 лет назад

    Please do an episode on local notification, and how the provider framework works when you try to tap on the notification pop up to open to a specific page. This would be very helpful!

  • @sadabwasim9850
    @sadabwasim9850 5 лет назад

    Best episode so far, loved it

  • @TienHuynh5312
    @TienHuynh5312 5 лет назад +4

    Can you update the documentation on use cases of different providers?

  • @Dhruvam
    @Dhruvam 5 лет назад +4

    I am definitely going to try Provider. Bloc has been really hard to implement small features.

    • @djminikin
      @djminikin 5 лет назад +1

      actually, that's quite easy even boring and repetitive when you understand how it works.

  • @websky4241
    @websky4241 5 лет назад +1

    Make a movie about the 3.0 provider. There are many changes, for example ProxyProvider, how to use it and when. BTW nice video 😉

  • @EibeMandel
    @EibeMandel 5 лет назад +7

    Could you do In-App Purchases next? It's one of the most important topics.

    • @soufiane_akki
      @soufiane_akki 5 лет назад

      ruclips.net/video/NWbkKH-2xcQ/видео.html

    • @shavar67
      @shavar67 5 лет назад

      EibeMandel they already did checkout the playlist

    • @zhorky
      @zhorky 5 лет назад

      Actually receipt validation is way more important, because if you don't validate your IAPs people will cheat on it.

    • @mohammadhossieni2636
      @mohammadhossieni2636 5 лет назад

      visit episode 20 and fireship channel too

  • @putinninovacuna8976
    @putinninovacuna8976 5 лет назад

    it's not boring but awesome we can learn alot about provider I wish I can code like u all

  • @kojoprempeh
    @kojoprempeh 5 лет назад

    The much awaited show 💃🏽

  • @truongsinhtran-nguyen7129
    @truongsinhtran-nguyen7129 5 лет назад +2

    As Matt admitted, this is quite struggling and confusing, possibly because we are refactoring from stream pattern to listener pattern. However, after watching this show, I have an impression that Provider is doing more than one things at the same time (SOLID anyone?), one is dependency injection, and two is dataflow/state management.
    Doing DI, Provider is better and/or easier than InheritedWidget, at least with proper `dispose`. This is the reason it is said that Provider can be used with BLoC, and creates some confusion.
    Doing state management, it takes a different approach than BLoC (which is basically stream/reactive/Rx), so the learning curve to flutter can be gentler for those who don't have the background in reactive functional

  • @sutechsdev
    @sutechsdev 4 года назад

    Hi there! I started Flutter with the provider and I'm pretty comfortable with this. But now my company is asking me to use BloC, but I really don't like BloC, and I'm getting a hard time working with the bloc. So should I use bloc or just say to my company that I can't use bloc. Please suggest should I use bloc or not.

  • @marvinm6156
    @marvinm6156 5 лет назад +1

    How does the provider work in situations where i want to use Navigation-Routes? My Provider isn't there available anymore. How do i reach it there?

    • @marvinm6156
      @marvinm6156 5 лет назад +1

      OK i found a way by myself. One way ist to move up the Provider initizaltion above the Material App. More ways can be found here: github.com/rrousselGit/provider/issues/85

  • @82invisinle82
    @82invisinle82 5 лет назад

    Great video about Provider. I have a question in my mind though. I would be happy if you can help me to understand some point. I have an app and I am using provider to handle the authentication. I wrapped my MaterialApp with ChangeNotifierProvider. Apart from that I have an Auth class that extends ChangeNotifier and I notify the listeners after the user is logged in or I check if there is a current user(local storage) in the constructor. Depending on the user state I return appropriate widget(Login screen, main screen etc.) It works perfectly but when I use Navigator to push new routes, The ChangeNotifier builder part where I wrapped MaterialApp rebuilds everytime even there is no change with the data. I am not calling notifyListeners either. So I dont't understand why pushing new routes triggers that part. To give an example I have a widget in the main screen with a FutureBuilder which returns a list. When I click to a list item it pushes to a detail view. When I go back, it rebuilds the previous widget so FutureBuilder is fired again. I assume it is rebuild because it is a descendent of MaterialApp and that part is being rebuild causes my main screen to rebuild too.

  • @DanielPorto0
    @DanielPorto0 5 лет назад +5

    I started thinking that it was an extended version of the IO talk, but instead of a nice way into Provider it was actually a painful guide of something you advised not to do in the talk: which is porting to Provider an app that was already working perfectly in Bloc. As a result it requires knowledge of both (BLoC and Provider) and was a pain to watch. Don't get me wrong, I love the show and I follow the whole series. But the question that remains in my mind after this process is whether I really learned something or got even more confused... was it worth it?
    Maybe a better move would be porting from hardcore bloc to flutter_bloc lib instead.
    And for provider lib, something from scratch would more helpful to 'think provider' from the beginning. Of course, that is either a branch of this show or we will have to wait until a new series start.
    But thanks anyways. Sincerely.

  • @TheDragonballpokemon
    @TheDragonballpokemon 4 года назад

    i have one question
    What is the overhead of sending a object down the stream
    so for example i have an application with arround 25 widgets Or arround 12 screens.
    i set the initial value at screen 3 and get and use the value at screen 10-12
    The whole process of passing object from 3 to 10 using context will have some overhead
    What and how much exactly will be the overhead for moving 3 to 10 without using it once
    Thanks

  • @martdingley
    @martdingley 5 лет назад +1

    Great show guys, full of laughs 😂

  • @d-apps2699
    @d-apps2699 5 лет назад +2

    Thank you for this video but the current version of provider is 3.0.0 but the video is 2.0.1 :(

  • @amanshah2654
    @amanshah2654 4 года назад

    i really wanna know which is better this approach or bloc pattern for state mangement

  • @willzarem
    @willzarem 5 лет назад

    Could you guys do an example of how to implement FirebaseCloudMessaging with state management and provider? I'm struggling a bit with it since I want to use the same architecture you're showing. :)

  • @pradeep422
    @pradeep422 5 лет назад +1

    Oh My fav Matt heree finally.........:)))) Awesome!!!!!!

  • @GuilhermeCarvalhoCarneiro
    @GuilhermeCarvalhoCarneiro 4 года назад

    Does the information proceed that the Provider should not be used in medium and large projects because of the limitation of ChangeNotifier in relation to the number of listiners that it can answer?
    Sorry for bad writing, I don't speak English

  • @michelfeinstein
    @michelfeinstein 5 лет назад

    Why did you initialized the cache Map() in an initialization list at the constructor, and not at the field's declaration? It doesn't use anything from the constructor.

  • @a.k.m.saifulislam3891
    @a.k.m.saifulislam3891 5 лет назад

    I'd like to know which macbook model you're using as a flutter developer and how it's going on so far with you?

  • @chrisodonnell86
    @chrisodonnell86 5 лет назад

    Hey with using StreamProvider.value, do you have an example of how to use the the "catchError" property, I can't find anything online besides the official documentation which I can't translate to a real world example. Help! :)

  • @EricBichara
    @EricBichara 5 лет назад

    Very informative!

  • @lasindunuwanga5292
    @lasindunuwanga5292 4 года назад

    Awesome vid. They sitting there for almost an hour. Hard working i guess

  • @MinhTran-xn3kk
    @MinhTran-xn3kk 5 лет назад

    hi. should i create class called model to put data/vars into it to keep provider is simpler. look like MVP or MVVM ?

  • @basudevnayak8762
    @basudevnayak8762 3 года назад

    Seeing Google guys using apple is fun 😂

  • @mattl7599
    @mattl7599 5 лет назад +2

    Matt, where did you get that T-Shirt! Its awesome haha! I want one.

  • @nidalbakir4720
    @nidalbakir4720 4 года назад

    provider now is in version (4.x.x) and hopefully, you make video for this and in a way more forcesing on provider itself
    ''Sorry for bad English "

  •  4 года назад

    why you don't advise on checking other patterns like MVP or clean architecture? is it at antipattern somehow to Flutter react world? I'm having some issues with coworkers were they argue that this is now how Flutter should work because you advise Bloc or Provider instead of other's

  • @michelfeinstein
    @michelfeinstein 5 лет назад

    This Notifier reminds me A LOT an MVVM ViewModel from C#... How do they differ in architecture?

  • @hadifromlebanon3812
    @hadifromlebanon3812 5 лет назад

    When rapping the whole app with a ChangeNotifierProvider, and say for example a specific value that’s being displayed in a text changes, does the whole ui get rebuilt or only that specific textview?

    • @watchcrap1
      @watchcrap1 4 года назад

      No the listeners will be rebuilt. Wrapping the app with ChangeNotifierProvider just allows to you access the provider further down the widget tree, e.g. with the Provider.of(context) or the Consumer().

  • @michelfeinstein
    @michelfeinstein 5 лет назад

    You guys should review the captions, someone captioned "Flutter" as "Photo"

  • @Trancecend
    @Trancecend 5 лет назад

    How old is this? Provider 3.0 has been out for a while now.

  • @LE8271
    @LE8271 4 года назад

    Is there ANY advantage of Bloc vs Provider in reality?

  • @shababkarim5907
    @shababkarim5907 4 года назад

    why is it that every time I start a new app, I need to watch this video :(

  • @saiprasadchindam5185
    @saiprasadchindam5185 2 года назад

    Great video, please share the code

  • @KsAmJ
    @KsAmJ 5 лет назад +1

    I need this dart shirt 😕

  • @thiagoblin
    @thiagoblin 5 лет назад +5

    I need that shirt! Where can I find it?

  • @jimjaylee7553
    @jimjaylee7553 5 лет назад +1

    That's shortest boring show ever~
    Let's bore people further.
    hahahaha

  • @jayvasant114
    @jayvasant114 5 лет назад

    Where can I find source code to refer after watching the video ?

  • @raul286162
    @raul286162 5 лет назад

    Well first at all, please use a black theme for your IDE 😅. Now It was a great refactoring example from Bloc to Provider but, since I'm new in flutter and I'm already starting with couple hours with Bloc, there are some things confusing me, can I really completely replace a complex bloc project with Provider. I was wondering how I’ll deal with certain logic like showing modals, snackbar, notifications, etc. Because all the examples that I found are straightforward. Or is provider not intended to solve such things? It’s just a DI system?
    PD: 1:01:55
    Each one of us has been there 😂

    • @easyflamer
      @easyflamer 5 лет назад

      I'm actually curious about the same stuff. I kinda have some stuff like triggering snackbars with Provider but I feel like it's very hacky and it'd help a lot to see what idiomatic Dart looks like for that XD

  • @flutterpiaui5662
    @flutterpiaui5662 5 лет назад

    uau amazing!!

  • @RenittoJose
    @RenittoJose 4 года назад

    stackoverflow.com/questions/57559489/flutter-provider-in-initstate
    Same issue but I need to pass 2 parameters from the widget to the method in Provider. Couldn't find a proper answer yet. Any help is appreciated.

  • @sweetogo
    @sweetogo 4 года назад

    So, for state management, is it a Flutter best/preferred practice to use, especially in a new app, provider instead of BLoC?
    I see even Flutter documentation documents provider for simple state management: flutter.dev/docs/development/data-and-backend/state-mgmt/simple

  • @m.arslankhan7449
    @m.arslankhan7449 4 года назад

    can anybody explain please @25:02 when the context is replacing with the underscore . why ?

    • @hadifromlebanon3812
      @hadifromlebanon3812 4 года назад

      M.Arslan Khan nothing important, usually unused parameters like in this case get named as _ as a convention

  • @andreya1087
    @andreya1087 5 лет назад +1

    link to the pull request
    github.com/filiph/hn_app/pull/7

  • @GroovinChip
    @GroovinChip 5 лет назад

    Matt's Flutter apparel making me jealous as usual lol

  • @SafdarAliShah_TimeTraveler
    @SafdarAliShah_TimeTraveler 5 лет назад

    Amazing...Videos..Love it from Pakistan..Peace out..TC #flutter #love_flutter #pakistan #dart #provider

  • @pskpsk6
    @pskpsk6 5 лет назад

    How are errors handled. Like a Network request failed

  • @MinhTran-xn3kk
    @MinhTran-xn3kk 5 лет назад +1

    Why provider's version is 2.0.1 now ?

  • @guidoc3518
    @guidoc3518 4 года назад

    it only works on debug mode, on release it doesn't work unless you kill the app and reopen.

  • @arqamhussain8298
    @arqamhussain8298 3 года назад

    Wait a minute ! they are using macbooks !

  • @michelfeinstein
    @michelfeinstein 5 лет назад

    Guys, I love the show, but I honestly think it could be a lot better if you had some preparations beforehand. This way you could show us all the struggles that you had, but just taking a small amount of time, while coding the best solution at the show.... Instead of just trying to make things work in one hour, and not showing us the proper way to solve things. I don't mean to be harsh, I just think the show could be better, more informative this way :)

  • @ITMANZ
    @ITMANZ 5 лет назад

    Hi max :)

  • @G4MR1
    @G4MR1 5 лет назад

    I clicked that link so fast!

  • @jasonleo
    @jasonleo 5 лет назад

    what exactly is BLoC stand for

    • @wongni
      @wongni 5 лет назад

      Business Logic Component

    • @jasonleo
      @jasonleo 5 лет назад

      @@wongni thank you!

  • @TusharOjha
    @TusharOjha 4 года назад +1

    53:59

  • @prafulgupta7004
    @prafulgupta7004 5 лет назад

    Have a look at state_rebuilder

  • @xiaojiangguo1596
    @xiaojiangguo1596 5 лет назад +1

    mark

  • @sahilkumar2953
    @sahilkumar2953 5 лет назад

    This looks more or less like scopedModel to me

  • @MyDisal
    @MyDisal 4 года назад

    can you please go dark mode?

  • @bacharsaleh6984
    @bacharsaleh6984 5 лет назад +5

    Old record. Provider version now is 3. 😁

  • @zhenliu287
    @zhenliu287 5 лет назад

    Why no Chinese subtitles?

  • @kamaleshbasu3755
    @kamaleshbasu3755 4 года назад

    While Provider is good for smaller apps, I constantly find that it gets cumbersome when working with multiple developers and for really large Apps. Redux is definitely the way to go for such Apps.

  • @MinhTran-xn3kk
    @MinhTran-xn3kk 5 лет назад +2

    39:10 why ids is final . i usually use var :(

    • @suzuki2535
      @suzuki2535 5 лет назад +3

      Because there're no reassignment of that variable.
      Using final makes code easier to understand and it tells the next reader that the value is from only this assignment not from elsewhere.
      Basically if you keep functions small, variables is not gonna be assigned multiple times.

  • @tuobraun
    @tuobraun 5 лет назад

    Oh, I wish I could understand something :’( I guess I need to start from scratch again...

  • @themri
    @themri 5 лет назад +12

    The most confused boring show

    • @filiphracek
      @filiphracek 5 лет назад +1

      That's my secret Cap. I'm always confused.

  • @ramonblack
    @ramonblack 3 года назад

    tutorial on how to program without google haha

  • @mukhtarfauzi5824
    @mukhtarfauzi5824 5 лет назад

    koplak 😁

  • @rikyriky966
    @rikyriky966 5 лет назад +1

    Sorry but this video provides nothing beneficial to me. Why don’t you guys go with somewhat the basics?

  • @praharsh_bhatt
    @praharsh_bhatt 5 лет назад

    first

  • @poindexterfrink8276
    @poindexterfrink8276 5 лет назад

    To those looking to quickly learn and implement clean state management in flutter, skip learning this whole layer and check out flutter_redux.

  • @RaphaelPungin
    @RaphaelPungin 3 года назад

    Too much talking about unrelated stuff. Please stick to the topic and this will make the video shorter. We need to spend time coding our own apps rather than watching one-hour videos. Thanks!