Flutter move row within column to the bottom of the page

Viewed 60

I am trying to create a footer at the bottom of the page using SizedBox however I am having issues positioning it correctly.

I am using the following layout:

body: SingleChildScrollView(
  child:Column(
    children: [
      Center(),
      Center(),
      Spacer(),
      SizedBox()
    ]
  )
)

When I try to run it I get a renderflex error, after doing some searching around I saw people mention that i should wrap my column in Expanded or SizedBox however both of those do not work as they also give renderflex error's on their own. I also tried using align combined with mainAxisAlignment but that doesn't move anything.

Thanks in advance!

2 Answers

If you're using scaffold, there is an option called bottomSheet , it exactly what you're looking for.

maybe something like this?

body:Stack(
 children: [
 SingleChildScrollView(
  child:Column(
    children: [
        Center(),
        Center(),
        Spacer(),
       ]
     ),
   )`
   Positioned (
        bottom:0, 
        child:SizedBox(),
   )
 ]
),
Related