Open
Description
Hi @wwwdata, I find this package really useful and very interesting to have a nice animated app.
I'm trying to integrate it in my project by placing the ImplicitlyAnimatedList
widget in a Column
with the shrinkWrap
boolean true. Even so, the child widgets take up all the available height. I don't understand why.
I tried removing the Flexible
widget but it's the same. I would like to not constrain the size of the ImplicitlyAnimatedList
widget but rather have it fit its content. Is this possible?
Here is the associated code:
Scaffold(
body: Padding(
padding: const EdgeInsets.symmetric(
vertical: 30,
horizontal: 10,
),
child: StreamBuilder<List<DataObject>>(
stream: DataProvider.listenObjects(),
builder: (context, snapshot) => !snapshot.hasData
? const Center(
child: CircularProgressIndicator(),
)
: Column(
children: [
Flexible(
child: ImplicitlyAnimatedList<DataObject>(
shrinkWrap: true,
primary: false,
scrollDirection: Axis.horizontal,
items: snapshot.data!,
areItemsTheSame: (a, b) => a == b,
insertDuration: const Duration(milliseconds: 700),
itemBuilder: (context, animation, item, index) =>
FadeTransition(
opacity: animation,
child: DataObjectWidget(dataObject: item),
),
removeDuration: const Duration(milliseconds: 700),
removeItemBuilder: (context, animation, oldItem) =>
SizeFadeTransition(
axis: Axis.horizontal,
curve: Curves.easeOutSine,
animation: animation,
child: DataObjectWidget(dataObject: oldItem),
),
),
),
// ... other widgets
],
),
),
),
)
Thanks in advance for your help.
Metadata
Metadata
Assignees
Labels
No labels