Answers for "scroll to top flutter"

0

scroll to top flutter

final _scrollController = ScrollController();

scrollToTop() {
    Timer(
      Duration(seconds: 0), () => _scrollController.animateTo(0.0, curve: Curves.easeOut, duration: const Duration(milliseconds: 300)),
    );
  }
  
SingleChildScrollView(
  controller: _scrollController,
  child: addWidget(),
))
Posted by: Guest on October-06-2021

Browse Popular Code Answers by Language