AnimatedList (Flutter Widget of the Week)

Поделиться
HTML-код
  • Опубликовано: 10 июл 2024
  • Use AnimatedList to make your lists more dynamic. You can use it to animate your lists when inserting or removing items.
    Learn more about AnimatedList → goo.gle/2WAHXmb
    Learn everything about Flutter at → goo.gle/2WAhEN1
    Get more tips! → goo.gle/307BX6t
    This video is also subtitled in Chinese, Indonesian, Italian, Japanese, Korean, Portuguese, and Spanish.
    Subscribe! → goo.gle/Flutter

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

  • @tannerdavisr
    @tannerdavisr 5 лет назад +34

    The widgets you guys have thought of never cease to amaze me. Great work again

  • @RodrigoGomezV
    @RodrigoGomezV 5 лет назад +123

    The fire animation at the end

    • @llFike
      @llFike 4 года назад +14

      Waiting for a built-in AnimatedFire widget

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

      @@llFike cringey apps

  • @omzer97
    @omzer97 5 лет назад +131

    Longest tutorial on this list 😂

  • @hyperasci3339
    @hyperasci3339 5 лет назад +8

    this widget solved my problem. Awesome!!

  • @mertdogan5667
    @mertdogan5667 2 года назад +2

    Thats what i was looking for.Always covered by FLUTTER :)

  • @gabrielalvesgoncalves9959
    @gabrielalvesgoncalves9959 4 года назад +7

    The F.r.i.e.n.d.s. references was the best!!!

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

    I just liked it because of the innuendo (friends is the best series!)

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

    Amazing video, I like this section Widget of the Week 😄

  • @sleeplessdev7204
    @sleeplessdev7204 4 года назад +7

    Appears to be a syntax error in the itemBuilder example at 0:45
    The child property containing MyListItem(_myItems[index]) ends in a semicolon, rather than a comma
    This would result in an exception if run in a real app
    Love these videos though!

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

    Excellent!!

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

    One of the more useful and complicated widgets.

  • @Chiragpatel8827
    @Chiragpatel8827 5 лет назад +13

    that friends reference 😂

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

    if I have a static list (better to say a list loaded from internet but after it has been loaded it never changes until a refresh is clicked), is it possible let slide the items from bottom after data has been fetched instead of just let it appears instantly?

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

    Filip out here having a time of his life

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

    This is awesome

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

    Awesome!!

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

    I was just googling it yesterday

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

    Awesome widget

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

    It's really good

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

    Wow,awesome!

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

    Nice video.

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

    Cool! ThankS

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

    WoW, so nice

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

    How do we combine AnimatedList and ReordableList? How do I add animations to my ReorderableList?

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

      Have you found out mate?

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

      Maybe, don’t know how it would work. But you could try using a swippable widget and just use the insert and remove so that you can change it

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

      If you want to combine them together you would need to write your own list.
      But if you want your items to be able to drag and drop AND nicely be inserted and removed you may try to use a Stack and place draggable list on top of the animated list.
      And when you want to show insert/remove animation you hide your draggable list and show your animated list, when animation is done you swap them back, so that you can drag items.
      I know it sounds a bit hacky but I don't know any other way.

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

    amazing

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

    It works with streams?

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

    Awesome

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

    Does this work with version 1.2 or I have to upgrade first.

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

    AWESOME

  • @Ali-kl3ql
    @Ali-kl3ql 4 года назад

    Could this widget be a alternative for Recycler View!? And does it manage memory like that?

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

    very nice

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

    Doesn't it conflict with concept of reactive ui design, where you don't need to bother about data changes.

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

      The seams do show here, that's for sure. When you go low-level / efficient enough, all bets are off.

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

    Even Flutter love F.R.I.E.N.D.S.

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

    @Filip Hráček or anyone who may know:
    Is there any way to place *TWO* vertical AnimatedLists on the same screen?
    Meaning that the page is scrollable and its height consists of those two AnimatedLists

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

      Maybe not in time xD but I think you can put them inside a CustomScrolliew, set the shrinkwrap to true and then set the physics of both to NeverScrollableScrollPhyshichs()

    • @firstnamelastname-oy7es
      @firstnamelastname-oy7es Год назад

      You would probably need to have a widget at the side of the two animated scroll lists to act as the 'scroll bar' that lets you scroll the page, cause both the animated list will catch the finger drag and scroll themselves instead of scrolling the whole page.

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

    Is there a SliversAnimatedList that I can use within CustomScrollView or NestedScrollView?

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

      not yet, u would have to write it yourself.

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

      why don't you use:
      SliverList(builder: SliverChildListDelegate([AnimatedList(...)]))

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

      @@rebarius It won't work. Slivers can't be fooled by Widgets especially by scrollable.

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

      There is a SliverAnimatedList class api.flutter.dev/flutter/widgets/SliverAnimatedList-class.html that can be used in your case.

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

    Cool

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

    A function? Appears to be a class because the naming convention used - begins with Capital alpha-character?

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

    I am facing with a problem, I have a chat message list, when user scroll to top I will load more message and add items to top, while the items are adding at top, I send new message the item will add at bottom, in this case something wrong happen, the item at bottom dont add, I print each of item It re-build many time so the AnimatedList still not finish update so when I add at bottom the error happen

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

    More of this......!!!!

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

    When using the Key method, dont we need to call setState() after?

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

      correct 👌🏼

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

      AnimatedListState::insertItem, already calls "set state" for you, so you don't need to call set state.

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

    How would one apply this in a FutureBuilder ?

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

    Does anyone ever added elements to an AnimatedList while listening for bloc events?

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

    how to change the duration of the animation ?

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

    Lets Flutter !

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

    it's difficult to work with this widget

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

    That's pretty neat, can you use it along with a Stream Builder?

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

      Yes

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

      I'm going to have to face this issue soon. Did you come up with a solution?

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

      In the builder method of StreamBuilder you can return any kind of Widget. So why no AnimatedList? I don't see why.

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

    why not a drop in replace for listview..

  • @user-eg5es8re3d
    @user-eg5es8re3d Год назад

    is there an explanation on provider package

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

    How to fix cropped shadow in a AnimatedList

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

    nice comment!

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

    da Semana?! tem BR aí ?!

  • @dimondantist
    @dimondantist 4 года назад +7

    What the heck is MyTween() ?

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

      Was wondering that too, they mean
      Tween(
      begin: const Offset(100.0, 50.0),
      end: const Offset(200.0, 300.0),
      ),

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

    Why changing from .io to .dev?

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

    Just used it today. One issue found. When removing 0th index item from the Animated List, 0th and 1st index items are getting removed. :(

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

      Can you please file a bug at github.com/flutter/fluttter? Ideally with repro code. I haven't seen this problem yet.

    • @AbhishekKumar-oq5xe
      @AbhishekKumar-oq5xe 4 года назад +1

      @@filiphracek Oh! Filip himself is replying!!

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

    how do we create a sorting list animation?

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

      remove unordered items and then insert it to their ordered position

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

    guys, the sample (flutter.dev/docs/catalog/samples/animated-list) is deprecated,
    can anyone point me at a tutorial?

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

      stackoverflow.com/questions/56522546/how-to-use-animatedlist-in-flutter

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

      @@Iapicca83 Thank you for this :)

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

    moveItem???

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

    Ahoj Filipe!

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

    Is there a way to use AnimatedList with streams from Firestore as underlying data structure?

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

      sure just get the data via provider and display it via streambuilder in the animationlist

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

      @@howtobe449 AnimatedList(api.flutter.dev/flutter/widgets/AnimatedList-class.html) doesn't seem to have a StreamBuilder property. Can you elaborate?

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

      @@christianuldallpedersen2657 I guess he meant to create a StreamBuilder, and in builder method, you build AnimationList on every event in the stream you subscribed to.

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

    Unfortunately this video is very deceptive. When using the GlobalKey method you cannot be 100% certain that the currentState of the key is not null. Basically what I am saying is that if, for example, a Firebase message comes in and you need to insert that message into the animated list then the currentState of the GlobalKey you have assigned to the AnimatedList is very possibly null and cannot be used to perform the insert operation.
    AnimatedList needs to be enhanced or some other alternative offered which is fairly easy to use and understand.

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

      i know that's a silly question, but when the animatedlist is shown why should the GlobalKey be null? Specifically in which case would it be null?

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

      can we null check?

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

    second!

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

    animate .... list xD

  • @MrBenten867
    @MrBenten867 5 лет назад +14

    28 the view first comment

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

      who cares

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

      Why would anyone like this comment?

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

      What did it say?

  • @raz-sensei
    @raz-sensei 3 года назад

    Ah yes, it's simple. So simple. Let me tell you about everything that you need to make a simple row animate in or out and all the objects you need to use and watch out for.
    Meanwhile in iOS:
    [self.tableView beginUpdates];
    [self.tableView insertRowsAtIndexPaths:insertIndexPaths withRowAnimation:UITableViewRowAnimationFade];
    [self.tableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationFade];
    [self.tableView endUpdates];
    End of tutorial lol

  • @myxzlabs5635
    @myxzlabs5635 10 месяцев назад

    Can we use something automatic just like diff callback in android? What about imitating listview.separated?

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

    Awesome !!