I’m trying make a web with Flutter. When I created a list widget, I see my Scrollbar nextto list widget like this
My result:
And this is what I want to do for scrollbar:
How can I move scroll to outside of my page?
My code:
Scaffold(
appBar: AppBar(),
body: SizedBox(
width: MediaQuery.sizeOf(context).width,
child: Center(
child: SingleChildScrollView(
child: Column(
children: [
Container(
constraints: const BoxConstraints(
maxWidth: 1200,
),
child: Column(
children: [
//widgets
],
),
)
],
),
),
),
),
);
Thanks
2
Answers
I moved Center Widget to inside SingleChildScrollView and it work:
Old:
New:
Based on your question
There two ways to achive your purpose:
set the
crossAxisAlignment
on Column parent with CrossAxisAlignment.stretch`.Add widget that have
double.infinity
width toColumn
parent.Check my comment inside code section