I am taking ListView() or SingleChildScrollView() in body widget by default. So it is scrolling the content if it is less content. I want to scroll enable only if content is greater than screen height. If content height is less than screen height, need to disable scroll.
double? physicalSizeScreenHeight =
ui.window.physicalSize.height / ui.window.devicePixelRatio;
physics: physicalSizeScreenHeight <= 700
? AlwaysScrollableScrollPhysics()
: NeverScrollableScrollPhysics(),
It is working for some devices and not working for some devices depends on screen width and height and also depends on resolution.
Without checking any condition at "physics" for always or never and allow to AlwaysScrollableScrollPhysics(), then depends on conent height, need to enable/disable scroll.
Any suggestions would be helpful to solve this issue.