Open phattranky opened 5 years ago
Can you show me how to use Snaplistcontroller...plz
You can custom your own animation
In snaplist_view.dart
file,
change:
bloc.explicitPositionChangeStream.listen((offset) {
print("new offset: $offset");
_controller.jumpTo(offset);
});
to:
bloc.explicitPositionChangeStream.listen((offset) {
_controller.animateTo(offset,
duration: Duration(milliseconds: 300), curve: Curves.fastOutSlowIn);
});
I try to using setPosition. The functional working well except it doesn't have animation. It just jumps directly to the position. I try to set
snipDuration
but not effect. Can anyone help me?. Thanks