I am using a SingleChildScrollView and when tapping on FormTextField in it, the keyboard appears and the scroll view is scrolled upwards. After dismissing the keyboard, I am still able to scroll the Scrollview manually. Can you please suggest any solution to disable the manual scrolling after FormTextField disappears.
You can use the following code in your singleChildScrollView.
physics: NeverScrollableScrollPhysics(),
It stops it from being able to scroll.
In my case, when I put physics: NeverScrollableScrollPhysics() SingleChildScrollView can't be scrolled, but a scroll bar appears. If I use the scroll bar, the content is scrolled.
I need to hide the scroll bar:
ScrollConfiguration(
behavior:
ScrollConfiguration.of(context).copyWith(scrollbars: false),
child: SingleChildScrollView(
physics: const NeverScrollableScrollPhysics(),
child: child,
)),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With