Complete GetX State Management | Flutter

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

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

  • @hoekbrwr
    @hoekbrwr 4 года назад +2

    I am starting up as a Flutter user and did some courses on the basic principles. However, I never felt good with all the types of page transitions and State Management solutions. All those guys(and Girls) use so many terms I have never heard of. THIS MUST BE POSSIBLE TO DO IT MUCH EASIER!!!!. That was what I was thinking after every complex explanation! THIS is the most straightforward solution for page transitions and, I did not notice that on the RUclips title, also easy peasy State Management. This is awesome for a simple hobbyist who does not have a degree in programming.

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

      Leo en Rien van der Hoek so this is the 2nd video of the 3 part series. Video #1 is on page transitions if you want to check that out 😊

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

      @@tadaspetra I started with Video #1. Now going on for GetX and Firestore and loading examples. Study the docs.... Super videos with main features explained.

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

      Leo en Rien van der Hoek oh okay okay I see now. By the way I know the firestore and GetX livestream was long, and while I would definitely appreciate the watch time. The Friday video will be a recap of it 😊

  • @meansnada
    @meansnada 4 года назад +22

    I'm mashing the "Like" button but it ain't incrementing enough! Great job as always. Keep it up! Proud of your amazing work.

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

      Haha thanks man! I really appreciate it!

    • @AmitKumar-qv2or
      @AmitKumar-qv2or 4 года назад +1

      Always smash the button for odd numbers of time :v

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

      maybe because that function is wrapped inside debounce(), try again

  • @AnubhavAnand884
    @AnubhavAnand884 4 года назад +5

    Was looking for a good getx tutorial from ages. Thanks for the video. Really good explanation.

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

      Thanks man! Glad it was helpful!

  • @nudgecodes7471
    @nudgecodes7471 4 года назад +8

    Wonderful work !! I will replace the multiple package with one , I hope get dive deeper in lazy , routes binding and localization (load locales files From json file & translate with plaure and args) , Thanks for this video

    • @tadaspetra
      @tadaspetra  4 года назад +2

      Will be going over some of those things in the next video. (Not locale from json tho 😅)

  • @saabirmohamed636
    @saabirmohamed636 4 года назад +3

    Wow i never knew getx so simple... Until now I just kinda ignored it.
    Its so fast to get going... Thanks for this definately subscribed

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

      Saabir Mohamed yes exactly! It simplifies so many things

  • @WesleyAlves-ii6xl
    @WesleyAlves-ii6xl 4 года назад +2

    Amazing. Thanks for the video. It clarified a lot about Getx. I believe that like me, many would like to see how Getx would work with lists, forms, and everyday things that need to be reactivated. Thanks again for posting this content on your channel.

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

      I’ll look into that 👍

  • @yashraut19
    @yashraut19 4 года назад +5

    Best tutorial I have ever seen!

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

      59_Yash Raut wow thank you! I really appreciate it 😊

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

    Many thanks for the vid, and thanks to Jonny (& others) for some super work. I tried Flutter some time back and tore my hair out over state management. Now that it's this simple, I'll definitely retry Flutter. GetX makes it simple and elegant.

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

    Best introduction to getx

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

    Good job.. Its simple and easy to use.. One suggestion is zoom the editor bit more as it would be easy to follow.. Thank you..

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

      shanes2007 yea I should definitely do that. Thanks!

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

    Great job. easy to understand! best GetX tutorial I haven seem!

  • @RehanKhan-xf3ml
    @RehanKhan-xf3ml 4 года назад +1

  • @ТэмүүжинЦогоо
    @ТэмүүжинЦогоо 4 года назад +3

    Really liked the video, there is a reason it has 0 dislikes xD Can you do GetX Utils next time like changing Theme and Locale, it has barely any docs about the Utils. That would be great!

    • @tadaspetra
      @tadaspetra  4 года назад +3

      I’m editing that video today!!! And actually it has 1 dislike yesterday haha but I guess the guy changed his mind

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

      @@tadaspetra link to video

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

      @@Kooshad1 ruclips.net/video/ttQtlX_Q0eU/видео.html

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

    I love the series, the "workers" as reactions in Mobx and the "getter" has computed vars, all without using meta decorations! Bravo! I can imagine using computed vars to validate form fields! Awesome . the debounce is awesome. Just a recommendation to the Dev if he can make a worker like a filter, where the filter will override an observer value with a filtered value.
    Example:
    filter(count, (counter)=> counter > 10 ?10 :counter, active: true);
    filter(text,(text)=> _capitalizeFirst(text));

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

      Short to Ground I'll let him know and see if this is something on his radar 😊

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

      @@tadaspetra I submitted a feature request just now

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

      Short to Ground good call 👍

  • @PS-cc3pz
    @PS-cc3pz 3 года назад

    Great video man 🔥, On to the point. I was frustrated with flutter state management & scoping. This GetX seems seems natural and less cluttered

  • @shreyanssethia7368
    @shreyanssethia7368 4 года назад +3

    Really excited about it

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

    Awesome, why your videos are always so good, to the point and perfect duration . What do you (Amateur Coder & whom so ever reading my comment) use most also considering writing unit test cases for business logic:
    -Riverpod
    -GetX
    -BLoC (stream controllers)
    -flutter_bloc
    -Redux
    Personally, I have mostly used flutter_block with state/event/yeild sort of architecture with every screen/page.
    Started getting in to River and GetX but really now with lot of choices getting into confusion...

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

      I think unit tests for all state management solutions should be similar. The concept that you can set the state is the thing that makes unit testing simpler

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

    There are a few things I want to say including some questions:
    1) I’m using Provider with ChangeNotifier for an highly complex app. That many Provider classes cause a performance problem. (It is not seen but eventually it happens as shown in debugging tools.)
    Also using providers is difficult because of syntax and the need of context.
    The reactive side of the GetX, the Obx, may also cause performance issues since they are basically open streams.
    So I figured out that the best way for a state management is using the onUpdate side of the GetX. That way updates occur only on demand. The syntax is easy, no context and no calling the controller class inside the main build method of a widget class.
    2) When using GetBuilder, what if we need multiple controller classes? In Provider package we have the MultiProvider package. It’s useful to wrap other widgets. GetX does need a wrap too.
    How can I depend on multiple GetX controllers inside the GetBuilder? (Maybe wrapping them over and over just works but is there a better syntax for readability?)
    3) Provider package uses the closest provider class declared in the widget tree. I have post and profile screens in my app. (You can think it like Instagram where you can constantly navigate to a post than its user profile than another post than a tagged person’s profile over and over.)
    I use some of the provider classes as the logic controller instead of doing logic stuff inside the StatefulWidget.
    For example there is a ProfileScreenUI class which holds UI related to a user profile. There is also a ProfileScreenProvider class which is consumed by each of the ProfileScreens.
    A user can navigate to another user’s profile page over and over and do stuff which changes their state.
    UserA->UserC->UserB-> on it goes on. The screens are totally unique to the corresponding users. So each time the user navigates to a new user (or even the same user’s profile), I create another ProfileScreenUI class using a separate instance of ProfileScreenProvider class as a controller.
    Because that I give each of the new ProfileScreenUI classes a provider class, they always use the closest one up in the widget tree which is the new ProfileScreenProvider instance.
    Can I do this with GetX?

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

      1) yea it all depends on the use case. If your project has a lot of streams you should probably rethink it and use onUpdate instead
      2) You have access to those controllers inside the other controllers if you need it. You can also just "put" multiple controllers and they should work fine. If the UI depends on multiple of them, then you would probably need to wrap it twice.
      3) I don't see why you wouldn't be able to do it, but also I haven't tried something that complex yet

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

    Great video, simple and very clear!

  • @fabiojansen4286
    @fabiojansen4286 4 года назад +5

    Excellent video. Please use GetX to interact with an api (CRUD) thanks

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

      Yep! That’s definitely in the plans. Might do that after the next video!

    • @tadaspetra
      @tadaspetra  4 года назад +5

      Yes that’s the plan. I mostly work with Firebase so I’ll look into that !

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

    Great work! Keep it up

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

      thank you! And i will never stop!

  • @labiadhmohamed4062
    @labiadhmohamed4062 4 года назад +2

    waiting for it !

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

    Thanks for your hard work. Really. it's a good video for getx.

  • @Hypothermia1337
    @Hypothermia1337 3 года назад +1

    I'm so glad i found your channel!
    Is there any way you could make a video-guide, where we could learn how to display complex json-data from an api call using GetX?

    • @tadaspetra
      @tadaspetra  3 года назад +1

      I have a series doing that with firebase 😊, building a todo app with getx. There is a playlist made for it

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

      @@tadaspetra I will definitely check it out!!

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

    Hey I'm starting a new project and am at a crossroads of GetX or Provider/Riverpod. GetX is amazing, but it's new and not a ton of resources or support yet. Seems using GetX is a bit of a gamble since it hasn't "proven" itself quite yet and Provider is tried and true. I see some people say global state is not a good idea and question if GetX can scale. What are your thoughts? Are you going to use it or would you recommend it for a production app? Thanks!

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

      So I would like to preface this with I haven't developed a production app with GetX yet. So I dont know if I'm qualified to answer 😂. From everything I've heard though, there are some bigger companies using GetX, and I haven't really heard any performance complaints about GetX either. The package author has a section about GetX performance. Another point is Riverpod uses global state now too. It's not activated when it's defined but activated when it's used. But it's pretty much just a global variable. So in my opinion, I think you can't really go wrong with any of those options. I would personally go with either GetX or Riverpod because I enjoy them more. But if you're comfortable with Provider it's been tried and tested.

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

      @@tadaspetra Awesome thanks for the info! I have a good feeling about GetX, and the fact that Riverpod is using global state now makes the decision easier. I just wish there were more GetX resources out there. You've done a great job explaining it, thank you for that :)

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

    It was nicely explained.Great tutorial:)

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

    7:52 update a instance of a class, 12:16 update a variable, I have to use update method which is option 2 for update user (instance of User class), update a variable works well without using any update function

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

    tnx! really comprehensive tutorial.

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

    Awesome tutorial mate! Thks

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

    You're a blessing. Thanks!

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

      Thank you for watching 😊

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

    Very useful. Thank you

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

    It's amazing. Amazing !!!

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

    thank you so much, clear, concise and very well articulated!
    question: what's the getx equivalent initstate, superinit and setstate? been trying to get a basic camera screen setup but not sure where cameracontroller gets called, how to set which camera to use and how to dispose.
    would appreciate some help "translating" / refactoring from standard statedul widget to getxcontroller. most tutorials and examples (like camera package example) use stateful widgets and theres not enough info out there to help me wrap my head around to reverse engineer how getx is working.
    anything would help, i'm bashing my head on keyboard. perhaps it would be a useful quick video tutorial as well?
    thanks for your hard work!

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

      The GetX and GetBuilder have an initState in them. But you can also use a Binding if you want to initialize based on the screen you are entering. You can check out the 3rd video in the series to learn about bindings 😊

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

      @@tadaspetra thanks! ya bindings are new to me as well i will see if i can figure it out. is it literally called initstate? and super? or oninit? thx & congrats on hittin that 4k hours and becoming official youtube partner

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

      @@jtpulford2716 Inside the getBuilder and GetX observable they are called initState and there is also a dispose 😊. And thank you! It was a grind to get there haha

  • @АлександрИванов-ю8с8г

    Yeah!

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

    It's so cool, I love it

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

      ZERO M glad to hear 😊

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

    Well done!

  • @Oumar961
    @Oumar961 4 года назад +2

    Great tutorial friend, I use Get.put() to get Getbuilder to properly work but it keeps the controller's data when I leave the screen, and I want reinitialize it, how do I go about it ?

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

      There are a couple ways, one way i would look into is Bindings. You can bind it to the specific screen and it will get deleted automatically when you leave it. If you want to manually delete is there is a Get.delete 😊

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

      @@tadaspetra Ohh yeaah I understand, thanks brother

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

      Oumar Kane no problem. Glad to help!

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

    Seems good, maybe I should try to use this instead of bloc for my next project.
    Just a clarification, what if you have an observable on screen 1, and on screen 2 you have called a method that changes the value of observable in screen 1.
    Does the screen 1 obs will change the value?
    Anyways thanks!

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

      Yes, any obs observing that state should update 😊

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

      @@tadaspetra thanks for the clarification :)

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

    Hi Tadas. Thanks for your amazing video. You mentioned that you were goning to use GetX for your next project, I am wondering how did you find it so far? I am going to use GetX in my project. your answer would help in my way! Thanks

    • @tadaspetra
      @tadaspetra  3 года назад +1

      Hey, this video was from a long time ago. To be honest, I haven't used GetX much since these videos. My main state management package is Riverpod. I just really enjoy the safety and control you get with it

  • @mitzukodavis7393
    @mitzukodavis7393 4 года назад +2

    Awesome

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

    awesome sir

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

    do you have more complex getx example or video and more complex form data with backend service api for end to end knowledge want to learn. Thanks in advanced.

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

      Phyo Min Zaw yes I do! I made a series for a full Todo app with Firebase. There’s is a playlist of that series 😊

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

    Hello there im someone who has been stuck with RxVMs approach of state management , and i have really liked how getx simplifies Reactive solutions. I have one question though, how do i combine multiple Controllers together so i can create a Centralized State in which i can access anything in it? Thanks

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

      Tesfahun Kebede I think you could use bindings for this. And create a binding for the whole app.

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

      @@tadaspetra Thanks Buddy , i will check those out , it'd be great if you upload a video that covers that.
      Keep Up the Good Work !!!

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

      Tesfahun Kebede there next video in the series has it 😊. ruclips.net/video/ttQtlX_Q0eU/видео.html

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

    Thank you.

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

    Thanks. Very useful. Looks like I want to move all my stateful widgets to getx. I am trying to find out how to use 'typical streams', like getUserLocation/Calculate distance to somewhere with getx.

  • @TPITEOTG
    @TPITEOTG 9 месяцев назад

    "The Jury Is Still Out": suppose I am building Book Library Web application, and I am reading book Id 123 on a page number 78. When I click "refresh" button in the browser, "state" gets lost because of application reload. How to maintain the state without hardcoding book Id and page number in the URL?
    [I think framework needs local and/or remote persistence store for this to work, and any claims "ABC state management implementation uses less memory than XYZ" are too far from real life requirements]

  • @abdulwahab3021
    @abdulwahab3021 4 года назад +2

    how to keep app wise state of the application , for example when leaving the second page and going back to second page again it reinitiate the sum controller class with values 0 , what if we to keep the values even if the page is popped?

  • @jrheisler
    @jrheisler 4 года назад +2

    I was looking at applying this to an app I am writing, and I was wondering how you would approach this use case: Using a Navrail, you have created a stack of containers representing pages/views. The user taps and the currentIndex is updated through a simple setState...the page changes. The ever present problem of reaching back to the navrail's currentIndex to change pages from within the page. I uses a ValueChanged to a call back... Which of the many forms of Get would be best?

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

      Just to make sure I understand. So changing something on a page that is not currently displayed from a different page? If so you should be able to use any of the options. But if I’d probably go with GetBuilder since it doesn’t seem like it needs to be reactive.
      Hopefully I understood that correctly 😅

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

      @@tadaspetra specifically, the navrail has a currentIndex: stackIndex, which when a rail's item's onTap calls: onTap: (val) {
      setState(() {
      stackIndex = val;
      });
      },

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

      You should be able to find whatever controller you’re looking for with Get.find even within navrail

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

      @@tadaspetra It might be a simpler thing that. I'm just not sure how to make stackindex controlled. What am I wrapping in a GetBuilder with:
      currentIndex: stackIndex

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

      Oh I think I see what you’re saying. So like how to rebuild the screens based on the stackIndex GetBuilder? So you could have the stackIndex be managed by a controller. And then as far as what gets wrapped in a GetBuilder, to be honest I’m not completely sure of the best approach. You could wrap the whole screen part. But i don’t think that’s very efficient. I’m gonna have to look into that a bit lol

  • @Giigigi1122
    @Giigigi1122 3 года назад +1

    Hey! Thanks so much for these videos. I am trying to apply this with the class model {} and data from mongodb to update users or getting messages or sending messages.
    Would be great to see these with GetX on here or even on Udemy or other tutorial sites.

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

    Thank you

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

      Zaid z thank you for watching!

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

    Hello Again, Say I want to create a simple component with only one variable and it ought to be reactive, which shall be more expensive then statefulwidget or get ?

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

      GetX extends statefulwidget so it will be similar. You can't go wrong with either!

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

      @@tadaspetraCool, Thanks !

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

    sounds good

  • @AmitKumar-qv2or
    @AmitKumar-qv2or 4 года назад +2

    can i use getx, obx, getbuilder in same extended class of GetxController class?

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

      I don’t see why not 😊

  • @christian-313
    @christian-313 3 года назад

    Nice tutorial !!! I've been worked with it a long time ago ... but it this moment I'm trying to put tabs inside a view with N controllers 1 for each tab. But I've and error when I'm trying to call a method inside my apiRepository. "The method 'logout' was called on null" I took this tab out the tabs view so the method is working fine ...
    But I need a view with it's tabs. Did you try it ????

    • @tadaspetra
      @tadaspetra  3 года назад +1

      I have never tried doing something like this unfortunately. It could be the routing messing stuff up

    • @christian-313
      @christian-313 3 года назад

      @@tadaspetra I hope it, unfortunately we must do without getX or generate my custom tabs system.

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

    123/5000
    You think it is possible to put an MVC example with obx or getx for updates from a database values and update the view?

    • @tadaspetra
      @tadaspetra  4 года назад +2

      Next week there will be a video with GetX and Firebase. But I’m not sure if it will be very strictly MVC

  • @sagedelbassuni6183
    @sagedelbassuni6183 4 года назад +2

    Thank you,
    How to make controller available for all route like BlocProvider in flutter_bloc,
    Like login controller i want it to be available in all route

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

      Saged saeed you just have to initialize it and it's globally available wherever you need it 😊

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

      @@tadaspetra
      yes i do initialize it on login screen and after login and Get.offAllNamed() to home screen i get
      controller not found. you need call put(controller()) before

    • @jonatasBorgesdev
      @jonatasBorgesdev 4 года назад +2

      Hi Saged, use:
      Get.put(GlobalController(), permanent: true);

  • @АллаФилатова-ю9т
    @АллаФилатова-ю9т 2 года назад

    thanks a lot!

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

    do you have any tutorial using ValueBuilder ?

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

      No I haven’t taken a look at that one

  • @nateg617
    @nateg617 6 месяцев назад

    How do you manage with a RX for a model that has required parameters to make it .obs?

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

    uhm, 14:14 how can we increment the value even though it's final ?
    or is that because we're using e.g. `count1.value++`
    tysssm btw you're amazing

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

    Is it possible to change appBar title with obx or getx? It's like onClick title change?

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

    Hello, Can I ask can u create a video on how to use Timer in GetX? I have a problem because it's counting but I can't update UI every second no matter what I'm trying thank you.

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

    How it can implement change state in UI depending on the for example status of downloading data from Internet ? I mean I want to show progressBar when data is downloading, how I can do it in Getx?

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

    hello, do you have an example of how to use this with googlemaps? I need some help

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

    When do I use GetX and when do we use ObX? How can i decide?

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

      If you need anything onInit or dispose then use GetX. But if you just want to listen to the changes then ObX

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

    I'm new to flutter, Will getx hold data even you move into different screens?

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

    if you click home and re-open app from stack, the app will restart ??

  • @LeagueRandomPlayer
    @LeagueRandomPlayer 4 года назад +2

    MAn one question, can i create immutable classes as states?

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

      Random Gaming I think you can just reassign a new Object to the state everytime. But it isn’t like StateNotifierProvider. I’m not too sure if it would be the same

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

      great great video dude

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

      Random Gaming thank you 🙌

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

    Hey thank u for the tutorial, I am trying getX on my project, I want to rebuild the whole widget tree of a page so I put empty setstate({ }) while using getx (so its working fine), I want to know is there any way to rebuild widget present natively in getx ?

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

      I’m not sure what you are asking. Whatever you wrap within the Getx will be rebuilt whenever any state changes. So if you have your whole screen wrapped with a GetX then the whole screen will rebuilt whenever state changes

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

      @@tadaspetra Wraping whole widget with Obx() works! thank u so much!

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

    You dont need 'Get.Find().increment();' just use the context '_.increment();'

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

      Shinoda kl I think you're right, but I just wanted to show off the Get.find and it seemed to fit well there

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

    How can I access one controller from another? This isthe critical point in any non-trivial App and would be the reason for me to switch to GetX from Provider as it is very painful there...

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

      badlifting this is part of what makes GetX special in my opinion. You literally just do Get.find inside the other controller. That’s it.

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

      @@tadaspetra Amazing it works like a charm. Unbelievable easy compared to the ChangeNotifier chaos in Provider. We are close to production and I will now switch to GetX from Provider. Why is this package so underrated? Is everybody just building simple To-Do-Apps and therefore not realizing the flaws in Provider ? Thanks for your tutorial. Sub!!

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

      @@badlifting It's starting to get some traction now :). But yeah I think people just didn't know about it. And even for simple to do apps it might be easier.

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

    Brrrrrrrroo canımı yeeeeee. Sen de az copy paste yapmıyosun ama olsun. Mikrofonunu sevsinler.

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

    OOOOOOOOOHHHHHH THANKS VERY VERY MUCH.. i was wondering where do i trigger the change
    it was just to put controller.update();

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

    There's a widget called 'Getview' in getx.
    If I called update in the controller, will all child widgets of 'GetView' be rebuilt?

    • @tadaspetra
      @tadaspetra  3 года назад +1

      I think GetX has changed a bit since this video. The basics are still there, but. I would check the documentation

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

    how to use Getx for bottom navigation bar.. mean i want to change index of bottomnavigation..
    i just want to do that i have 4 screen in bottom navigation bar and in first screen i have button ..on press i have go to second index of bottom navigation..

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

      I would think theres a way to store the index in the controller and have the screens wrapped in a GetBuilder or Obx, and then they change based on that state change

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

      Yes i have done this using same logic

  • @АлександрИванов-ю8с8г

    what about initState, dispose if use only stateLessWidgets?

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

      GetBuilder and GetX come with an init and a dispose that get executed before the widget is built. Since it’s stateless that would be the same as and initState for statefulwidgets, since it would execute before the widget and thus the page is rendered

    • @АлександрИванов-ю8с8г
      @АлександрИванов-ю8с8г 4 года назад

      @@tadaspetra Please give example how it work. If i need initState _count = 1

    • @tadaspetra
      @tadaspetra  4 года назад +2

      Александр Иванов so if you see in the sumController.dart we have an onInit() where we define the workers, we can set the counts in there as well. And they will be set before the widget loads

  • @enryd...
    @enryd... 3 года назад +1

    zoom in the code for your next vid releases. :)

    • @tadaspetra
      @tadaspetra  3 года назад +1

      Yea I have been more zoomed in on the recent ones. I apologize

    • @enryd...
      @enryd... 3 года назад

      @@tadaspetra no worries!

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

    Your voice is cute =)) and thanks for the tuts

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

    can you create a video using getX, pagination API?

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

    Can you tell me the cons of GetX?

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

    The getter 'count' was called on null. Helpp

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

    Cual es la diferencia entre GetBuilder y Obx?
    Actualmente uso el Obx de esta manera.
    Obx( (){
    if(getController.variable.value){
    return SomeWidget();
    }else{
    return Container();
    }
    )

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

      Obx is for reactive (streams) and GetBuilder is for where you have to call update()

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

    If I want get user to figure out if he logged or not in or before GetMaterialApp for navigate him to login or home page how ?

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

      I don’t think it’s really possible before the GetMaterialApp. That’s before the actual app is running. Can you figure out login status before a MaterialApp?

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

      Amateur Coder yup by wrapping provider consumer and read instance value I will try wrapping material bu getbuild and try

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

      Yes try it and let me know. But if it worked with consumer then it should with GetX. The GetMaterialApp is just MaterialApp wrapped

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

      @@tadaspetra put this login status checker in your upcoming videos as well....please.
      P.S. You're Awesome 😎😎😎

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

    ithink iwill stick with getx because i get used to it

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

    太棒了

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

    Where is MixinBuilder ??

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

    differnce between get.put and get.find

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

    why does getx get a lot of hatred?

  • @jay_play2918
    @jay_play2918 Год назад

    Why my code not recognize RaisedButton? :C Pd: im using visual studio code on macbook