Code Hunter
Code Hunter

Reputation: 11218

Child container of AlertDialog not covering width

I want to show a popup on a button tap. When I am trying to show AlertDialog with my custom design child Container of this AlertDialog not covering whole space. It has some padding from corners. I have implemented in this way:

AlertDialog(
      shape: OutlineInputBorder(
        borderRadius: BorderRadius.circular(16.0)
      ),
      content: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Container(
              color: Colors.redAccent,
              width: screenSize.width,
              height: screenSize.height*.90,
              child: Text('test'),
            )
          ],
        ),
      ),
    )

For more info I am adding screenshot. enter image description here

Upvotes: 0

Views: 29

Answers (1)

Code Hunter
Code Hunter

Reputation: 11218

I found the solution for this. I resolve this issue by adding following tag in AlertDialog:

contentPadding: EdgeInsets.all(0.0),

Upvotes: 1

Related Questions