Flutter Animation Tutorial #6 - Animation Controllers

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

КОМЕНТАРІ • 60

  • @jamsheddeeznutz5551
    @jamsheddeeznutz5551 3 роки тому +12

    I swear these are better than paid tutorials. You sir, have saved my final year project and I thank you for that.

  • @SuperAnkursaini
    @SuperAnkursaini 4 роки тому +16

    No one explains as you do. You are just awsome.

  • @prathiv5203
    @prathiv5203 3 роки тому +3

    small hint at line 56 we can use _animationController.isCompleted which will give bool very nice explanation

  • @nurola
    @nurola 3 роки тому +2

    Best playlist ever about Flutter animation for beginners!!! Thank you.

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

    So many steps but explained brilliantly!

  • @astra5877
    @astra5877 3 роки тому +2

    one of the best tutorials on animations I've seen on youtube. very well explained, thanks :)

  • @hamza-325
    @hamza-325 3 роки тому +1

    These Animation Controllers stuff are the most complicated thing that I saw until now in Flutter! This will take some time before I grasp how all of these work. I will stick with the TweenAnimationBuilder since it is much simpler than these.

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

    Someone give this guy 1Million Subscribers.

  • @ezrakeeps
    @ezrakeeps 4 роки тому +10

    15 seconds ago 🔥🔥🔥🔥
    Thank you for taking your time to make this
    It is priceless

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

    Absolutely everything is clear

  • @ianworthington2324
    @ianworthington2324 3 роки тому +2

    Extremely good. Many thanks!

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

    You have knowledge + teaching talent, you are a start bro

  • @pasindunirmal
    @pasindunirmal 4 роки тому +13

    Thank you for this amazing tutorial. I was looking for an animation tutorial and found this.
    For reversing animation you can also use 'Built-in controller status checks' in the 'onPressed'
    if (_controller.isCompleted) {
    _controller.reverse();
    } else {
    _controller.forward();
    }
    so the final build method :
    Widget build(BuildContext context) {
    return AnimatedBuilder(
    animation: _controller,
    builder: (BuildContext context, Widget child) {
    return IconButton(
    icon: Icon(
    Icons.favorite,
    color: _colorAnimation.value,
    size: 30,
    ),
    onPressed: () {
    if (_controller.isCompleted) {
    _controller.reverse();
    } else {
    _controller.forward();
    }
    },
    );
    },
    );
    }

  • @gaurangshah6552
    @gaurangshah6552 3 роки тому +2

    Man is a god

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

    Thank You sooooooo soooo much!
    You helped me fix my coding error....
    CustomPainter overcomplicated it, but I worked it out! Thank You! :)

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

    I was reading the Animation section in Chapter 6 of "Flutter in Action" but, If was like flying over my head and I was unable to get it... You made me clear about this..! Thank You.

  • @MULTICODE
    @MULTICODE 4 роки тому +4

    Cool please a suggestion for the coming series.
    -A series on Angular
    -A series on livewire
    -A series on Alpine js
    Have a nice Ninja day.
    Thanks once more

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

    Superb Way to Explane Animation Thank You Soooo Much.

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

    very helpful; thank you for your clear explanation

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

    you don't need setState to change the value of a boolean variable (isFav), this is a variable not a state

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

    Nice tutorial. Gave me everything I needed!

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

    Big fan of you, sir plss make more gold contents like this gob bless you

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

    Sir please make video series on PWA with react and firebase.... Although your video series about PWA (JavaScript) was awesome

  • @trunghieu5386
    @trunghieu5386 3 роки тому +11

    I think that this way is better in stead of using a boolean and setState method
    onPressed: () {
    _animationController.isCompleted ? _animationController.reverse() : _animationController.forward();
    },

  • @Vejitasei
    @Vejitasei 4 роки тому +4

    Thank you again for the super tutorials. I was trying to stay 1 step ahead of you each time and I play with the code during the lesson (to try to learn and not just copy / paste your work). I skipped the Animation.status if statement and just wrote:
    onPressed: () {
    _selected == false ? _controller.forward() : _controller.reverse();
    isFav = !isFav;
    Was easier for my brain to follow. But love that I learned about the AnimationStatus. I'm trying to make my first real app on the side between tutorials, next big thing is some kind of database to store all the info, settings, favorites, etc. Going to check out your FireBase flutter tutorial next and see how that goes.
    bool Subscribed = true;

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

    thank you for the useful videos , can you make video about using SQLite in flutter specially multi tables and relations between them (PK, FK,etc ) and how to share data to all screens cause i didn't find that anywhere ??? thanks again

  • @quangminh8580
    @quangminh8580 6 місяців тому

    thank you so much!

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

    Can you reveal your Laptop/PC configuration? I mean RAM, Processor, and Graphic Card?

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

    Question: what if I have more than 2 states of animation? A StatusListener provides us 2 statuses, so that we can switch forward to red and back to gray, but what if I want to have a yellow color on second click, and return to gray only on third click?

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

    I got the feeling inside my bones

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

    you don't need the setstate with isFav boolean; setstate is for widget re- build which we aren't doing in this case;

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

    Thank you so very much

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

    Sir can u plzz make a guidance for how to go zero to hero for your plyalist

  • @The.Good.Gamer.Ps5
    @The.Good.Gamer.Ps5 2 роки тому

    Is there any way to flush the controller. I don't want to use reverse, just forward.

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

    Thank you for the excellent work you have done.
    however in lines 31-34 I don't understand the call to setState()
    if (status == AnimationStatus.completed) {
    setState (() {
    isFav = true;
    });
    }
    it can be remplaced with
    if (status == AnimationStatus.completed) {
    isFav = true;
    }
    and in lines 36-39 with
    if (status == AnimationStatus.dismissed) {
    isFav = false;
    };

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

    Hi Net Ninja, this is the third of your series that I'm working alongside of and I wanted to thank you because these videos are fantastic and your clarity when explaining is better than any of my lecturers. However, I tried to remove the status listener and have the ternary operator as _controller.status == AnimationStatus.dismissed, but with no status listener and it works completely fine. Is there a reason that you didn't do it this way? Is it due to an update that wasn't around back then?

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

      Bismillahir-Rahmanir-Rahim
      The reason it works is that the _controller.status changes during the animation. We create an isFav variable just to make things simple and easy to understand.
      Btw, I agree 100%. Ma Shaa Allah the tutorials are just amazing!

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

    i want the animation like byjuss app

  • @lakshyagupta7643
    @lakshyagupta7643 3 місяці тому

    A value of type 'Animation' can't be assigned to a variable of type 'Animation'.
    Try changing the type of the variable, or casting the right-hand type to 'Animation'.
    Facing this error

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

    so status listener is if you want to only do something when the animation is finished.

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

    Do we have to dispose the _conroller ?

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

    How many videos will this series cover?

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

    Iam from
    india

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

    Is the heart supposed to go out when we leave the page? Mine turns back to grey if i leave the screen and come back. I dont think thats going to be very useful if its a real app.

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

      Read the code. The on Press handler is being used to just change the color of the icon.

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

    How can i set the initial color of the icon when iam working with a database.

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

      I guess if you're storing the "isfavorite" book in the database you can do a ternary operator to check if it's a favorite of not and then return an appropriate color depending on the value of the bool stored in the database

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

      For example to set the initial color of the icon:
      Color: isFav ? Color(colors.red) : Color(colors.grey[400])
      And the operator for which color it should then animate to/from would be somewhat the same

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

    please react js about multilanguage app

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

    create movie app

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

    Firestor document id user id, user profile code

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

    Net Ninja 🥷 is GOATED 🐐