I am trying to add scrollbars vertically and horizontally. I have used Adaptive Scrollbar package.
return LayoutBuilder(
builder: (context, constraints) {
return Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
color: Colors.yellow,
width: constraints.maxWidth - 20,
height: constraints.maxHeight - 20,
child: AdaptiveScrollbar(
width: 20,
controller: _verticalScrollController,
position: ScrollbarPosition.right,
child: SingleChildScrollView(
controller: _verticalScrollController,
scrollDirection: Axis.vertical,
child: AdaptiveScrollbar(
controller: _horizontalScrollController,
position: ScrollbarPosition.bottom,
child: SingleChildScrollView(
controller: _horizontalScrollController,
scrollDirection: Axis.horizontal,
child: Column(
children: [
Row(
children: [
Container(
color: Colors.red,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.pink,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.orange,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.purple,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.black,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.blue,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.green,
width: 200,
child: Text("Test"),
),
],
),
for (int a = 0; a < 100; a++)
Row(
children: [
Container(
color: Colors.red,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.pink,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.orange,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.purple,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.black,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.blue,
width: 200,
child: Text("Test"),
),
Container(
color: Colors.green,
width: 200,
child: Text("Test"),
),
],
),
],
),
),
),
),
),
),
);
},
);
I want the scrollbars to be on the right and bottom, and I have also specified the position in the code, but still it shows on right and top.
Current output is shown in the screenshot below
I am using Adaptive Scrollbars just to make the scrollbars visible on the web.