Flutter Tutorial for Beginners #24 - Widget Lifecycle

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

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

  • @creamypasta8908
    @creamypasta8908 3 года назад +2

    I just want to thank you netninja! We're doing a mobile app using flutter, and we don't know anything about mobile developing. You are a life saver! Thank you for the free course! 11/10!

  • @HARSHITKUMAR-wj4ex
    @HARSHITKUMAR-wj4ex 4 года назад +57

    I haven't commented yet, but now i have to say man your tutorials are addictive.Literally I could not stop watching your series.
    Great work!!!!

    • @NetNinja
      @NetNinja  4 года назад +11

      Thanks so much! Glad you like them! :)

  • @ngotuanhien
    @ngotuanhien 3 года назад +70

    Since Flutter 2.5.0 on, a new button set has been replaced for RaisedButton with ElevatedButton, FlatButton with TextButton and OutlineButton with OutlinedButton.

    • @magic_malz
      @magic_malz Год назад +1

      Why would they do this to us? :D

  • @beratdinckan5585
    @beratdinckan5585 3 года назад +10

    Perfect series. The only reason why I get premium RUclips for downloading your Playlist :) thanks for the flutter series. I hope you keep adding new flutter tutorials. Thanks again Best regards.

  • @seaque.
    @seaque. 2 года назад +9

    for new Flutter version you need ElevatedButton, and it needs a style.
    add this as a local variable, preferably above counter.
    final ButtonStyle raisedButtonStyle = ElevatedButton.styleFrom(
    onPrimary: Colors.black87,
    primary: Colors.grey[300],
    minimumSize: Size(88, 36),
    padding: EdgeInsets.symmetric(horizontal: 16),
    shape: const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(Radius.circular(2)),
    ),
    );
    then use ElevatedButton like
    body: ElevatedButton(
    style: raisedButtonStyle,
    onPressed: () {
    setState(() {
    counter += 1;
    });;
    },
    child: Text('counter is $counter'),
    ), //ElevatedButton
    ); //Scaffold

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

    Best Flutter tutorial series I have ever seen, thanks for sharing.

  • @dominikvereno8404
    @dominikvereno8404 4 года назад +6

    After 23 videos, I've started to just press the like button at the beginning of the video

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

      Thanks so much :)

    • @antoniofuller2331
      @antoniofuller2331 5 месяцев назад

      Why? The series was good from the very beginning.

  • @dom2499
    @dom2499 3 года назад +2

    I just wanted to say a huge thank you. I am not really in a position to subscribe to your patreon but I just want to say I really appreciate these tutorials and they have made my week in lockdown very enjoyable!

  • @hammadulaziz1064
    @hammadulaziz1064 4 года назад +12

    From Pakistan
    I love the way you explains things, crystal clear 🖤🖤💙💙 stay blessed

  • @2chotti
    @2chotti Год назад +1

    I am addicted to this series. Thanks for making flutter interesting buddy.

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

      Glad to hear it! :) thanks for watching

  • @tekki.dev.
    @tekki.dev. 4 года назад +5

    amazing videos bruh....
    RUclips needs to suggest this to anyone who searches for flutter

  • @MojaveHigh
    @MojaveHigh 5 лет назад +53

    Quick FYI -- 1:55 - you said that Build() is called a lot in a Stateless widget, when I think you meant Stateful.

  • @Ryze001
    @Ryze001 5 лет назад +42

    Love from Algeria !
    Text( ' Awesome work ! ' )

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

      Please do not put spaces before punctuation marks :-)

    • @hamza-325
      @hamza-325 4 года назад

      Love += 1; // from Algeria

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

      @@psyhonut why not !

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

    I dont know how to express my feelings...But your teaching style is awesome++++++++++++++++++++++++++++++..Thankyou!!so much!!

  • @andreranulfo-dev8607
    @andreranulfo-dev8607 4 года назад +10

    "The Routs is a pathway to many possibilities, some consider to be..unnatural”;

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

    Thanks for the tutorials. You do a great job man! Thank you!

  • @yadhukrishna9839
    @yadhukrishna9839 3 года назад +3

    love from INDIA ♥♥♥
    show the support from India guys 🎇🎈🎇

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

    Great series , Really helped me to get started with Flutter

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

    Everything explained very well. Thank you Sir.

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

    No one:
    Shaun: Boasts how TODO is a great feature in Android Studio only to not use it.

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

    Awesome work.....i like all your videos(i am 12 and i am learning flutter and some other programming langs) and you are an awesome teacher!!!!!!

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

      Awesome! Thanks so much, and I think it's awesome you are just 12 and learning all this :D

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

      @@NetNinja Thanks

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

    Hehe this is much easier when you know react beforehand :p
    InitState = componentDidMount
    Build = componentDidUpdate
    Dispose = ComponentDidUnmount
    I wish someday Google include Hooks to Flutter too :p

  • @francisco.mendes
    @francisco.mendes Год назад

    i wonder if we just create every page as a stateless widget and only its inner widgets that we want to change as stateful would improve performance a lot... because like in tbhe video, we are reloading the whole page and we just want one button to change over time so making only the button stateful wouldn't it be better? thank u in advance and for this amazing series. ive been loving it so far!

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

    Loving this series.

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

    Same concept as react Dom updating. Thanks sir.

  • @mazenshams2224
    @mazenshams2224 11 месяцев назад

    that video was a good one man. hugely appreciate the explanation. Love the way you teach

    • @NetNinja
      @NetNinja  11 месяцев назад

      Glad it was helpful! :) thanks for watchng

  • @Tboxred
    @Tboxred 8 месяцев назад +1

    God bless you man, great teacher💯

    • @NetNinja
      @NetNinja  8 месяцев назад

      I appreciate that! :) thanks

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

    Dispose would be
    @override
    void dispose() {
    // TODO: implement dispose
    super.dispose();
    print('dispose');
    }

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

    one of the best explanations. thanks a lot

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

    Best Tut. Ever , working with it

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

    I am not that good at object-oriented programming but, I know basic stuff. I had to rewatch the quotes applications' tutorial again and again and I kinda understand it now. Still not clear but, hope someday I'll be good at it. Should I worry about not being able to understand that?. Also thanks for these awesome videos.

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

      Hey. Same here. Watching the videos and sometimes I worry about not understanding the quotes application better. Should I really need to worry? Or should I just continue. Now that I think you have watched all the videos and working on a app on your own.

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

    Thanks you , you are awesome ,struggling for these concepts now all clear !!!

  • @zicoovic8826
    @zicoovic8826 2 года назад +1

    I understand that initstate function will implement data once, but I still don't understand why we should use the intitstate, it's not clear to me till now, Shaun, can you help me with that?

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

    your work is Awesome. I really enjoy every video...

  • @antoniofuller2331
    @antoniofuller2331 5 месяцев назад

    hello Shawn, can you tell me based on your youtube statistics, how many people from Jamaica watched this playlist???

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

    Really great videos I must say, thank you! I just wonder what the initState function is for? I out commented that one and everything was doing what it was supposed to. So why do I need the initState function?

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

    fantastic! great lesson!

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

    best sensei in the world

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

    Love from china! too good to be free.

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

    Thumbs up, clean explanation, thank you!

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

    this man is amazing ever

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

    Man - you are fantastic!

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

    So we should write our own code below the super... in the initState() method? Then why is the //TODO comment automatically added above it?

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

    What are the differences/implications of putting the counter increment *before* the setState() call rather than inside it? They both work the same, afaik.

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

    how can i catch that a route/widget is being shown again on screen , when i do Navigator.pop()
    when popping it shows the anterior route, but doesn't trigger build or initState ,
    it simply showing an old built widget , which has lost its data because of memory management ( which i would recover on a build() or initState, if it was called )

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

    Great series

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

    Sir plz make a tutorial on firebase with flutter

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

      Working on it :)

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

    Followed steps exactly but at 6:39, got this error for counter - Undefined name 'counter'

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

    Can we make stateful widget inside stateless widget?

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

    I need to plant a farm of likes for your course Sir.

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

    I didn't get it: how did the button change if we hadn't given it a key arg? Without a key argument our widget should be updated, but not rewritten on the screen, isn't it so?

  • @misterbigstuff8503
    @misterbigstuff8503 8 месяцев назад

    Nice videos, i really enjoyed all f them, please is there an IDE for flutter development?

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

    god bless you man

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

    amazing tutorial

  • @ผศ.ปฏิคมทองจริง

    I like this video.

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

    Keep it up! I have already learned so much :D

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

    Great video my friend. Thank you👍

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

    why didn't you include the rest of the lifecycle methods? like didChangeDependencies etc.

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

    Thanks a lot :)

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

    Anyone knows ? do they teach flutter in Uni's ? great videos btw !

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

      No, I don't think they do, they only teach android development with Java and kotlin

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

      @@hvtarun7030 Nope. Uclan Uk started to teach Flutter. My professor said hopefully from next year in my Uni too.

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

      @@hvtarun7030 I mean, It's not that I don't like Android - but it's pointless learning just 50% of the market

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

      @@wearecode9199 True....I agree with you 1000%, but most colleges are still teaching java and kotlin because either they are not aware of the existence of flutter or don't have staff qualified enough to teach it, which is why I really think people like the net ninja are doing an excellent job teaching on a platform like youtube and making their content available to a wide audience.

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

      @@hvtarun7030 Yup that's right, but if you think about it if it takes longs to introduce something new into an educational system, then that new will become old, so we will always learn what's old and not quite suitable to the market :) a bit of a paradox there lol

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

    Very nice tutorial s

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

    When I type “init”, I don’t have the suggestion how come?

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

    Theory in between practicals 😳

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

    I am trying to add the counter function, but it keeps giving me an error of " undefined name".

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

    hello !!
    excuse me the variable counter shows as an undefined name could you help me !!!!!

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

    youaregreat!

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

    very good content.... me likey

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

    2:30

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

    Sir, please tell me the extension of vs code for flutter

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

      'flutter' and also 'dart'

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

    Amazing n_n !!!!!!!!!!

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

    Hopefully someone can help answer.
    I have followed along just fine and everything works, but my print statement when clicking the button only prints every so often.
    The counter updates and the button text is updated every single time, but the "build function ran" print statement only prints maybe every 3-5 seconds. If I double click or triple click the button, the numbers increase properly, but the print statement doesn't run.
    Is there a reason for this?
    I clicked 11 times and only got 3-4 print statements out of it.
    Not a big deal as all the real functionality seems to be fine, just curious.

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

      most likely memory utilisation management or something , because why run the function 10 times , when you can run it 3 or 4 times and get the same result , a neat feature I might add

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

    Your tutorials are very very good. But you talk too much. Even saying same thing again and again.
    I think you should focus on talking less. Just describe once, run app, show what happens, that's it. You don't need to describe again after run.
    Thanks for your efforts.

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

      He's always super clear.
      Being slightly redundant, sometimes, is a good thing.

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

      Well, not everyone can understand from hearing once xD