Reputation: 21
I have created some items in SingleChildScrollView
and the problem is that none of the items are scrolled in horizontal mode, but the same code scrolls the items in vertical mode.
Items are scrollable when scrollDirection: Axis.vertical
It can be scrolled horizontally on the Android platform, but it cannot be scrolled on the web and Windows form.
Scaffold(
body: RawScrollbar(
thumbVisibility: true,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
physics: AlwaysScrollableScrollPhysics(),
child: Row(
children: List.generate(
50,
(index) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 50,
color: Colors.blue,
child: Center(child: Text('Item $index'))),
)),
),
),
));
Upvotes: 0
Views: 75