Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Extend container into safe area – Flutter

I’m having an issue getting my container to extend downward into the "safe area" in my Flutter code.

Showing the problem. White container not extending to the edge of display:

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

return Card(
  elevation: 1,
  margin: EdgeInsets.all(0),
  child: SafeArea(
    top: false,
    bottom: true,
    minimum: const EdgeInsets.all(0),
      child: Container(
        margin: EdgeInsets.all(0),
        height: 50,
        width: double.infinity,
          alignment: Alignment.center,
          decoration: BoxDecoration(
            color: Colors.white,
            boxShadow: [
              BoxShadow(
                color: Colors.black.withOpacity(0.6),
                spreadRadius: 5,
                blurRadius: 7,
                offset: Offset(0,0)
              )
            ],
          ),
        padding: EdgeInsets.symmetric(horizontal: 20),
        child: Row( [...]

Does anyone see what the issue might be, or how I can fix it?

>Solution :

In your SafeArea to extend the bottom, you should call false:

SafeArea(
    top: false,
    bottom: false,//<---- add this
    ...
)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading