Last updated:
0 purchases
scrolls to top
Scrolls to top #
A dart package for working with scrolls-to-top iOS feature
Why is this needed?
This is necessary for those cases when you have several nested Scaffolds or you need to distinguish the tap event in the status bar from other scroll events
Usage #
Just wrap any widget with ScrollsToTop and provide onScrollsToTop argument
@override
Widget build(BuildContext context) {
return ScrollsToTop(
onScrollsToTop: _onScrollsToTop,
scaffold: Scaffold(
appBar: AppBar(title: const Text('Scroll to top')),
body: Container(),
),
);
}
Future<void> _onScrollsToTop(ScrollsToTopEvent event) async {
//TODO: Your code
}
copied to clipboard
Warning #
You need to have at least one Scaffold in your application
If you use several Navigators, the tap events will come only to the widgets inside the main Navigator
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.