FLUTTER ARCHITECTURE: GO FROM SETSTATE TO Architecture in 20 MINS

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 104

  • @Fireship
    @Fireship 5 років тому +75

    Cool vid! Really enjoyed the pace and music. Subbed.

    • @FilledStacks
      @FilledStacks  5 років тому +22

      Thank you, I appreciate your comment a lot. I studied your tutorials to handle my pacing and the clarity in your lessons so your feedback is priceless.

  • @tevinmorake8924
    @tevinmorake8924 3 роки тому +1

    A year later, and still a praise of respect for replying to all of your comments, and the fact that you're from RSA. Howzit broer, lekker videos you got. Baie Dankie!

    • @FilledStacks
      @FilledStacks  3 роки тому

      Thanks man! I'm great! Thank you and thanks for leaving a comment.

  • @WORD0FALLAHSWT
    @WORD0FALLAHSWT 2 роки тому

    i m beginner in this flutter however when i discovered your channel, it made me think it is a piece of cake for me to learn and master it. You are unbelievable Hat's Off .. [apprentice-Accept me as Your Student and guide me towards the right flow of flutter to reach max level of it]

    • @FilledStacks
      @FilledStacks  2 роки тому

      I'm happy to hear that! Thanks for watching, go through all the videos. If there's anything I mention that you don't know about then study that and apply it in code. In a few years you should be ready to build anything you can think of .

  • @VictorKun
    @VictorKun 5 років тому +16

    Dude, your way of explanation is highly appreciable. First showing the difficult things and then simplifying them using Standard Flutter Widgets and features. Highly commendable. :)

    • @FilledStacks
      @FilledStacks  5 років тому +2

      Thank you. I appreciate it. I think once people can see code and building apps the way I see it then they'll see it's not so difficult to creat a healthy and maintainable code base 😊 thanks for watching.

  • @moammarqaddafi4858
    @moammarqaddafi4858 Рік тому

    Too good. I found it still so much relevant although 4 years have been passed!

    • @FilledStacks
      @FilledStacks  Рік тому

      I'm very happy to hear that. Thanks for leaving a comment and letting me know.

  • @RobertWildling
    @RobertWildling 5 років тому +2

    This is, what IMO characterises an excellent tutorial: playing time: short, rebuilding-(or: build-along-)time: very long because of the amount of info compressed in the video!!! After all: videos can be stopped.
    Reeeeeeally fine, superb job! Thank you so much!

    • @FilledStacks
      @FilledStacks  5 років тому +1

      Thank you so much for the great feedback ❤️ i really appreciate it. I try my best to keep it dense and void of information that doesn't add to the topic at hand. It means a lot knowing you can see that 😊 thanks for letting me know.

  • @yifenghou986
    @yifenghou986 4 роки тому +1

    This is super awesome. It shows how we can evolve the architecture when the app gets more complex instead of over engineering in the first place. Love it. Thanks a lot!!

    • @FilledStacks
      @FilledStacks  4 роки тому

      Yes! Exactly, I'm glad you found it insightful. it's something I want beginners in Flutter to understand. There's no need to jump into an architecture. If you write your code with good principles it can be adapted to any architecture at any point.

  • @learningisgrowinglig
    @learningisgrowinglig 4 роки тому

    You are a perfect Teacher. Many videos on youtube only explain things directly without answering why we are doing something. This video first shows the problem and then the answers developing reasoning which is very important for to be a confident developer. Thank You for all the good work :)

    • @FilledStacks
      @FilledStacks  4 роки тому +2

      Thank you 😊 I try my best. Thanks for the feedback and thank you for waching

  • @mohammadjrab3169
    @mohammadjrab3169 11 місяців тому

    Great video, very easy to understand. Keep up the good work bro

    • @FilledStacks
      @FilledStacks  11 місяців тому +1

      Thank you! I appreciate your encouragement.

  • @agoodmansaid
    @agoodmansaid 4 роки тому +3

    You're really good at this man! I'll admit for a novice such as myself, your pace is a little fast but maybe thats what I need to move to more intermediate understanding👏🏽

    • @FilledStacks
      @FilledStacks  4 роки тому +2

      Thank you. I do think the pace helps a bit, I try not to waste any time during my videos to make sure I fit everything into the video around the topic at hand.

  • @deviantstudio
    @deviantstudio 3 роки тому

    this is actually a pretty useful and accurate introduction into flutter apps architecture. i wish the flutter team had such tutorials in official docs.
    the only thing I don't like is the last part with dispatching commands to the viewmodel. looks like overengineering. i prefer android way when UI directly calls vm's methods, but VM itself only provides streams of data (which you have actually shown in this vid too).

    • @FilledStacks
      @FilledStacks  3 роки тому

      Thank you, I appreciate that a lot. I also prefer the way you described :) This was simply to show how you can go to that setup. If you watch my architecture series I call the VM directly with what I want to do. I don't use streams / commands at all.

  • @kazbeksultanov6103
    @kazbeksultanov6103 5 років тому +1

    Really good reasoning of each pattern. Thanks!

  • @ParabTarak
    @ParabTarak Рік тому

    This is excellent. Thanks...💙

    • @FilledStacks
      @FilledStacks  Рік тому +1

      I'm happy you liked it. It's one of my favorite videos because it shows the natural progression and you can stop anywhere in between.

  • @deepjyotibaishya7576
    @deepjyotibaishya7576 5 років тому

    Most welcome you to our Flutter Technology . Thank you

    • @FilledStacks
      @FilledStacks  5 років тому +1

      Deepjyoti Baishya 😃 it has been a great welcome.

  • @anant1489
    @anant1489 4 роки тому

    Very nice tutorials. Thank you for sharing your knowledge.

    • @FilledStacks
      @FilledStacks  4 роки тому

      thank you and You're very welcome.

  • @Aba97867
    @Aba97867 4 роки тому +1

    Congratulations! Thank you for share your knowledge!

  • @v0sn
    @v0sn 5 років тому +1

    i hope to see more from you in the future!:)

  • @rikyriky966
    @rikyriky966 5 років тому

    The video is great even it’s hard to follow. I can’t say I understand and have a road map in my mind for the part after the setState() . Anyways, keep these videos coming. Subbed!

    • @FilledStacks
      @FilledStacks  5 років тому +1

      Thanks for watching. Which parts are you struggling with? This video just lays out simple ways to architect your app for async scenarios that don't force any strict architecture on you. If you're looking for a more direct guide to architecture you should check out my latest video on ScopedModel. I go through the entire process of setting up an architecture for scoped model.

  • @coolprashantmailbox
    @coolprashantmailbox 5 років тому

    Awesome and very helpful video

  • @sebastianschaffer6952
    @sebastianschaffer6952 5 років тому

    Gotta say I love your videos but I am constantly overwhelmed by them as a newbie developer :D I just started coding 5 weeks ago so while i can see the logic in what you are doing, for me it is very hard to grasp the concepts behind your decisions because I lack understanding of basic coding principles. Anyway - your videos along with those from Fireship are my new challenge - because once I understand everything you guys are doing there I know I will have taken a major step in understanding development. Keep up the good work! :)

    • @FilledStacks
      @FilledStacks  5 років тому +2

      It's good to see that you're up for the challenge. You'll definitely learn a lot from our videos especially writing code that's easier to work with and maintain in the long run. I won't be doing many beginner stuff but I am producing some videos to explain, from the beginning, certain concepts or terms you'll hear during architecture talk. The new video is about Dependency injection. It was gonna come out this morning 😅 but I still run a consulting business and clients want releases 😁 so it'll be a bit late. I'll try to edit some more later on. If you're a beginner to dependency injection I think it'll help you a lot. Good luck on your journey, don't hesitate to reach out for help. I'll reply when i get a gap.

    • @sebastianschaffer6952
      @sebastianschaffer6952 5 років тому

      @@FilledStacks Ah yeah...clients :D We all know the "pain" :) Thanks man, much appreciated. Will def. check out the new video...also want to learn more about Provider for state management (the confusing part as a noob is to know what to focus on..learning is somewhat easy compared to that). Anyway, will go back to watching your videos at .75 speed lol. Good luck with the client work!

    • @FilledStacks
      @FilledStacks  5 років тому +1

      @@sebastianschaffer6952 hahaha 🤣Is it really that fast. I have written tutorials for everything so the video should serve more as a overview. You should use the written for the code and follow along with that as well.

    • @sebastianschaffer6952
      @sebastianschaffer6952 5 років тому

      @@FilledStacks nah, I'm just slow :D it is perfect once you understand the basics and can just follow what you are doing. I watched it 3 times now and finally understand what that whole stateController business does. I lacked understanding of how streams work so even slowmo wouldn't have made a difference. I get it (more) now so...progress!!
      A technical question here though...in this example you call the getListItems function on initState and when clicking on the FAB. That means i would have to call setState whenever I change the content of the list (lets say the list had a "like button" per listItem for instance) since the StreamBuilder is not actually listening to the firestore/database stream but to the stateController stream.
      So it also doesn't respond to updates to the data coming from a different client for instance? So less like a "chat app" with a stream of data, but i have to make sure that the user refreshes the list when data has changed?
      (For context, I am trying to build a shared shopping list app as an exercise where 2+ users have access to a shared shopping list and can add products/change their state to "done" etc.)

    • @sebastianschaffer6952
      @sebastianschaffer6952 5 років тому

      thx for the pointing out the written tutorial btw...will check it out!

  • @happynewyearw
    @happynewyearw 5 років тому +3

    You are awesome! the video is so clear and compact!!!
    Can you look into (or maybe you already knew) RxVMS for state management? which use Rxdart + RxCommand + Get_It(service locator) with views/managers/services architecture, and maybe you can make some examples or implementation video about it in the future?
    I've been learning and using RxVMS and want to see how others us this kind of state management design.

    • @FilledStacks
      @FilledStacks  5 років тому +1

      Thanks for the feedback I appreciate it. I have not looked at it or even heard of it, but I'm reading up on it now. It sounds interesting, thank you for telling me about it.

    • @happynewyearw
      @happynewyearw 5 років тому +2

      ​@@FilledStacks Cool, Will definitely want to hear your feed back and opinion..
      And You're welcome! The best thing about learning Flutter now is the awesome support and openness of the Flutter Community, we always help each other out!
      The author of the article series did a fantastic job explaining RxDart and his other packages, and the architecture looks very well suit for Flutter state management and they work great with streambuilder!
      He also refactor the movie app "inKino" to RxVMS style (although the original one have been continuously update and know the two version looks a bit different), but nevertheless it's still a pretty good example.

    • @FilledStacks
      @FilledStacks  5 років тому +1

      @@happynewyearw Yeah man I 100% agree. I didn't know the Flutter community is so awesome until I started interacting with everyone. That's one of the main reasons I felt comfortable enough to start making videos for the community. I read through the blog posts from foundations to the self-responsible widget. Very cool idea, the main difference I guess from this and BLoC (since Block also uses streams and RX in some implementations) is that you have managers and a clear defined way to structure your app. Pretty cool. I'll use it in an app and you can expect a video of me covering it in detail at some point. Thanks again for letting me know about it.

    • @happynewyearw
      @happynewyearw 5 років тому

      @@FilledStacks Thanks! Looking forward to it! I'm currently learning and planning to make some app as well!
      I would also like to share my experience if I could, although my English speaking skill is not so great since I haven't been speaking English frequently for years now :P

    • @FilledStacks
      @FilledStacks  5 років тому +1

      @@happynewyearw You should definitely share your experiences. It's a fun process and you get a lot of feedback which helps you to become a better overall developer . And your English (typed) is very good, so I don't think you'll take long to get back into speaking good English.

  • @Salehalanazi-7
    @Salehalanazi-7 5 років тому +2

    Respect

  • @luyokai
    @luyokai 4 роки тому

    This is literally the best video I can find talking about the architecture on flutter. Just a question though: why do the state and event classes have to inherit from an empty class?

    • @FilledStacks
      @FilledStacks  4 роки тому +1

      I'm happy to hear that. We use empty classes so that the type can be used as a unique definition for the event. This can be done with enums as well, the thing with using classes is that your event description can also carry data in the form of properties on your classes. This makes it more robust as suddenly one state can store multiple states internally as well. This can be even better written by using named contructors.
      UpdateUserEvent.activate(true)
      UpdateUserEvent.changeName('Dane')
      I don't use this in real life. In production we use the stacked architecture which I explain in full in the latest 2 videos and the third one is coming out on sunday. I think you should give that a watch too and see if you like it. We're building very large apps quite easily with it.

    • @luyokai
      @luyokai 4 роки тому

      @@FilledStacks Wow! Really appreciate all the detailed answers. Now I am ready for the next level. Will check out the new videos on the stacked architecture. Please keep all the good stuff coming, sir :-)

    • @FilledStacks
      @FilledStacks  4 роки тому +1

      @@luyokai You're welcome :) I'll try my best to keep producing high quality content.

  • @nikhilkukreja8498
    @nikhilkukreja8498 4 роки тому

    Amazing ❤️

  • @DanielPorto0
    @DanielPorto0 5 років тому +1

    found a minor issue. in 16:16 when calling _stateController.add(DataFetchedHomeState... there is a video editing cut before finishing the line which should be _stateController.add(DataFetchedHomeState(data: _listItems)); The audio track mentions that quickly, but it's something easy to not notice and end up with a bug/crash at the end.
    thanks for the whole series.

    • @FilledStacks
      @FilledStacks  5 років тому +2

      Yeah. Sometimes i skip to quick. But that's why i have a full written version as well 😁 you should have that open and follow along to get the code faster. Thanks for pointing it out 🙏

    • @DanielPorto0
      @DanielPorto0 5 років тому +1

      @@FilledStacks I did, but the written tutorial finishes before you reached that part (Your last example still uses Enum instead of the classes).
      I was also a bit confused because I got the filling at the end the ui widget would become stateless again. But i guess that I will see in the provider tutorial.
      Thanks a lot. I'm enjoying the tutorials and learning a lot this weekend!

    • @FilledStacks
      @FilledStacks  5 років тому +1

      @@DanielPorto0 Awesome! That's great to hear. There's more to come so stay tuned :)

    • @mmmmikemmm7746
      @mmmmikemmm7746 4 роки тому

      hi thanks for finding that daniel. mine crashed without adding that bit of code. its not in the written tutorial.

  • @tasminchalmers
    @tasminchalmers 5 років тому

    SO COOL!!

  • @electronicsnerd8820
    @electronicsnerd8820 4 роки тому

    aah perfect !

    • @FilledStacks
      @FilledStacks  4 роки тому +1

      Great place to start! And I think the best place overall. No libraries, pure flutter. Thanks for watching

  • @mallen1846
    @mallen1846 5 років тому +1

    Nice job. I've come from MVVM and Xamarin and I've tried a dozen different patterns. I'm currently using observable_state it's light weight and a joy to use. Check it out if you are curious. Thanks again and keep up the good work.

    • @FilledStacks
      @FilledStacks  5 років тому

      Thanks. I come from Xamarin and MvvMCross as well :) I've seen observable_state mentioned and took a look at it, it definitely is nice and lightweight. I''ll be exploring many options in the Future.

    • @jajasaria
      @jajasaria 5 років тому +1

      try provider as google recommend it

    • @mallen1846
      @mallen1846 5 років тому +2

      @@jajasaria yes, I just recently switched to GetIt + Provider and really like it

  • @anmolsharma9539
    @anmolsharma9539 2 роки тому

    Thanks for the awesome video I really appreciate the effort in this. I have a doubt when I am passing the homeState.data.length in item count it is giving me error I have tried by not able to solve the issue can anyone please help in this.
    Thanks in Advance

    • @FilledStacks
      @FilledStacks  2 роки тому

      You're very welcome. What is the error?

  • @rajdave9862
    @rajdave9862 3 роки тому

    How do you make your thumbnails and which is the software you used to record your screen and to edit your videos?

    • @FilledStacks
      @FilledStacks  3 роки тому +1

      I made make my thumbnails in figma or sketch (on mac), i record my screen with flashback express and i edit my videos using Davinci Resolve

    • @rajdave9862
      @rajdave9862 3 роки тому

      @@FilledStacks thanks a lot sir.
      BTW your videos are awesome 🙂, please keep learning new things and keep teaching it to your fellow students.
      Thanks 😊 vro

    • @FilledStacks
      @FilledStacks  3 роки тому +1

      @@rajdave9862 Thank you! I appreciate the kind words. I'll try my best to keep learning and sharing the knowledge.

  • @creative-commons-videos
    @creative-commons-videos 5 років тому

    is there any tool to inspect bloc events, state etc, i come from redux background where i can inspect event and state using redux-devtools

    • @FilledStacks
      @FilledStacks  5 років тому

      Not that I've seen yet. If you use the bloc package (pub.dartlang.org/packages/bloc) then you have easy access to all the transitions / events being dispatched. You extend the BlocDelegate and provide it to your BlocSupervisor. Using this it would be easy to setup a visual inspector and even perform time travel like in Redux. I usually set up a SimpleDelegate that logs all my events and actions as a trace so that I can see the order of things. Was never a production level Redux dev so I was never spoiled by the advance tooling :)

  • @_shery.
    @_shery. 2 роки тому

    what is that drop at the start of vid

    • @FilledStacks
      @FilledStacks  2 роки тому +1

      I have no idea. It's so long ago :D

    • @_shery.
      @_shery. 2 роки тому

      @@FilledStacks bro plz try to find it

    • @FilledStacks
      @FilledStacks  2 роки тому

      @@_shery. Find what?

    • @_shery.
      @_shery. 2 роки тому

      @@FilledStacks the drop brother, at the start of the video.. : - D

    • @FilledStacks
      @FilledStacks  2 роки тому

      @@_shery. I have no idea what the drop is man :D

  • @jajasaria
    @jajasaria 5 років тому

    Do you have a provider architecture?

    • @FilledStacks
      @FilledStacks  5 років тому +2

      This video was before provider was announced. This is just to show what the thinking is behind implementing state management and how to do it without any packages.

    • @learningisgrowinglig
      @learningisgrowinglig 4 роки тому

      @@FilledStacks Perfect, Thank you so much

    • @FilledStacks
      @FilledStacks  4 роки тому

      @@learningisgrowinglig You're very welcome! :)

  • @eejazishaq4332
    @eejazishaq4332 4 роки тому

    Hi, is there any whatsapp group link..

    • @FilledStacks
      @FilledStacks  4 роки тому

      Hey there is not. But we do have a slack channel ( join.slack.com/t/filledstacks/shared_invite/zt-hqvqnd50-trS3YfEsL~2LQXfi9XjFBw )

  • @kingsleyusoro6349
    @kingsleyusoro6349 3 роки тому

    Sorry man I just want to ask are you south African by any chance ??

    • @FilledStacks
      @FilledStacks  3 роки тому +1

      Sup sup, yes I am. Born in Paarl Western Cape, moved to Cape Town for a few years, Durban for a few years, East London for a few years now I'm back in Paarl :D You from SA?

    • @kingsleyusoro6349
      @kingsleyusoro6349 3 роки тому

      @@FilledStacks Nah am from Nigeria but I grew up in Pretoria and stayed in SA for about a decade before I moved back home, but from your accent, I just had to ask bro

    • @FilledStacks
      @FilledStacks  3 роки тому +1

      @@kingsleyusoro6349 Nice, yeah it's very noticeable when you've heard it before.

    • @kingsleyusoro6349
      @kingsleyusoro6349 3 роки тому

      @@FilledStacks Can i get please get your email address bro, i would love to ask you something if you wouldn't mind

    • @FilledStacks
      @FilledStacks  3 роки тому

      @@kingsleyusoro6349 You can join the slack and ask me there.
      join.slack.com/t/filledstacks/shared_invite/zt-iq80kxjl-QykVQvcNkINaRHqtt~0Lcw

  • @bharat9837
    @bharat9837 4 роки тому

    I was lost after 10 min. I'm trying..

    • @FilledStacks
      @FilledStacks  4 роки тому

      haha, it's hard to follow if there's certain things in object oriented programming you don't understand. Try to focus on general programming first and understand these principles outside of flutter. then come back to this

  • @krupeshanadkat8606
    @krupeshanadkat8606 4 роки тому

    too fast... its like telling do this, do that.. done!

    • @FilledStacks
      @FilledStacks  4 роки тому +3

      Haha I can see that but I don't think slowing it down would add to the message in any way. In fact it might distract from it. Most comments below, as you can see are of the opposite stance. They love the pace of the video and there's no dead and wasted time in between with uhm's and ahhhhh's

  • @pratikmhatre4815
    @pratikmhatre4815 4 роки тому

    Great video, very easy to understand. Keep up the good work bro

    • @FilledStacks
      @FilledStacks  4 роки тому +1

      Thank you. I will try my best to continue that.