In my code when i increase the width of a SizedBox, the width always increases to right side. What i am looking for is, if we can increase the width to left side as well as right side.
SingleChildScrollView(
scrollController: MyInfiniteScrollController(negative:true),
axis: Axis.horizontal,
child: CustomPainter(
painter: MyCustomPainter(model: MyNotifierModel()),
child: SizedBox(
height: 250,
width: myDynamicWidthBaseOnScrollAndSetState)
)
)
I am aware of the infinite_listview to achieve this. But i am trying to use a single CustomPainter and SizedBox instead of having a list of CustomPainter.