79816656

Date: 2025-11-11 12:55:36
Score: 0.5
Natty:
Report link

If you want ListView to act like Column if scrolling is not needed, meaning drag gestures are not occupied unnecessarily:

ListView(
  physics: const ScrollPhysics(),
),

This works (or it does not work by default), because the default scroll physics is AlwaysScrollableScrollPhysics for the primary and vertical ScrollViews.

This is the condition in the Flutter source code:

physics =
    physics ??
    ((primary ?? false) ||
            (primary == null &&
                controller == null &&
                identical(scrollDirection, Axis.vertical))
        ? const AlwaysScrollableScrollPhysics()
        : null);

https://github.com/flutter/flutter/blob/2981516d74bc2b3307a7386e7be906602b65cf22/packages/flutter/lib/src/widgets/scroll_view.dart#L135-L142

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: puaaaal