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
The widgets you guys have thought of never cease to amaze me. Great work again
The fire animation at the end
Waiting for a built-in AnimatedFire widget
@@llFike cringey apps
Longest tutorial on this list 😂
Lol
this widget solved my problem. Awesome!!
Thats what i was looking for.Always covered by FLUTTER :)
The F.r.i.e.n.d.s. references was the best!!!
I just liked it because of the innuendo (friends is the best series!)
Amazing video, I like this section Widget of the Week 😄
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!
Excellent!!
One of the more useful and complicated widgets.
that friends reference 😂
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?
Filip out here having a time of his life
This is awesome
Awesome!!
I was just googling it yesterday
Awesome widget
It's really good
Wow,awesome!
Nice video.
Cool! ThankS
WoW, so nice
How do we combine AnimatedList and ReordableList? How do I add animations to my ReorderableList?
Have you found out mate?
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
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.
amazing
It works with streams?
Awesome
Does this work with version 1.2 or I have to upgrade first.
AWESOME
Could this widget be a alternative for Recycler View!? And does it manage memory like that?
very nice
Doesn't it conflict with concept of reactive ui design, where you don't need to bother about data changes.
The seams do show here, that's for sure. When you go low-level / efficient enough, all bets are off.
Even Flutter love F.R.I.E.N.D.S.
@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
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()
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.
Is there a SliversAnimatedList that I can use within CustomScrollView or NestedScrollView?
not yet, u would have to write it yourself.
why don't you use:
SliverList(builder: SliverChildListDelegate([AnimatedList(...)]))
@@rebarius It won't work. Slivers can't be fooled by Widgets especially by scrollable.
There is a SliverAnimatedList class api.flutter.dev/flutter/widgets/SliverAnimatedList-class.html that can be used in your case.
Cool
A function? Appears to be a class because the naming convention used - begins with Capital alpha-character?
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
More of this......!!!!
When using the Key method, dont we need to call setState() after?
correct 👌🏼
AnimatedListState::insertItem, already calls "set state" for you, so you don't need to call set state.
How would one apply this in a FutureBuilder ?
Does anyone ever added elements to an AnimatedList while listening for bloc events?
how to change the duration of the animation ?
Lets Flutter !
it's difficult to work with this widget
That's pretty neat, can you use it along with a Stream Builder?
Yes
I'm going to have to face this issue soon. Did you come up with a solution?
In the builder method of StreamBuilder you can return any kind of Widget. So why no AnimatedList? I don't see why.
why not a drop in replace for listview..
is there an explanation on provider package
How to fix cropped shadow in a AnimatedList
nice comment!
da Semana?! tem BR aí ?!
What the heck is MyTween() ?
Was wondering that too, they mean
Tween(
begin: const Offset(100.0, 50.0),
end: const Offset(200.0, 300.0),
),
Why changing from .io to .dev?
Just used it today. One issue found. When removing 0th index item from the Animated List, 0th and 1st index items are getting removed. :(
Can you please file a bug at github.com/flutter/fluttter? Ideally with repro code. I haven't seen this problem yet.
@@filiphracek Oh! Filip himself is replying!!
how do we create a sorting list animation?
remove unordered items and then insert it to their ordered position
guys, the sample (flutter.dev/docs/catalog/samples/animated-list) is deprecated,
can anyone point me at a tutorial?
stackoverflow.com/questions/56522546/how-to-use-animatedlist-in-flutter
@@Iapicca83 Thank you for this :)
moveItem???
Ahoj Filipe!
Čus!
Is there a way to use AnimatedList with streams from Firestore as underlying data structure?
sure just get the data via provider and display it via streambuilder in the animationlist
@@howtobe449 AnimatedList(api.flutter.dev/flutter/widgets/AnimatedList-class.html) doesn't seem to have a StreamBuilder property. Can you elaborate?
@@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.
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.
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?
can we null check?
second!
animate .... list xD
28 the view first comment
who cares
Why would anyone like this comment?
What did it say?
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
Can we use something automatic just like diff callback in android? What about imitating listview.separated?
Awesome !!