But on Android, nothing seems to work. I’ve tried messing with touchmove, overflow, and even relative positioning. No luck so far.
Has anyone run into this before? Any ideas on how to stop the app from collapsing when scrolling on Android? I’m totally stuck here. Thanks for any help!
Have you considered using a custom ScrollView widget in Flutter? I encountered a similar issue and found that implementing a custom scroll behavior can help mitigate the collapsing problem on Android.
Try wrapping your main content in a CustomScrollView with a SliverFillRemaining child. This approach maintains the scroll position and prevents the app from collapsing unexpectedly. Here’s a basic example:
The ClampingScrollPhysics() ensures the scroll doesn’t overshoot at the edges. This solution worked well for me across different Android devices. Let me know if you need more details on implementation.
I’ve dealt with similar scrolling issues in Telegram Bot Web Apps before. One solution that worked for me was using a combination of CSS and JavaScript to handle the scrolling behavior.
This approach prevents the default browser behavior while still allowing smooth scrolling within your app. It’s worked well for me across both Android and iOS devices. Hope this helps!