Home > Blockchain >  I want to create bottom sheet dialog like this image below in flutter
I want to create bottom sheet dialog like this image below in flutter

Time:07-28

Please help me!!! I m new in flutter, i want to create like this in my flutter app on button click.

enter image description here

CodePudding user response:

Try below code,

showModalBottomSheet(
      context: context,
      builder: (BuildContext cntx) {
        return Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            ListTile(
              leading: Icon(Icons.camera),
              title: Text("Camera"),
              onTap: () async {
          
              },
            ),
            ListTile(
              leading: Icon(Icons.image),
              title:  Text("Files")),
              onTap: () async {
              },
            ),
            Container(
              height: 50,
              color: prefix0.appBackgroundColcor,
              child: ListTile(
                title: Center(
                  child: Text(
                    "Cancel",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
                onTap: () {
                  Navigator.pop(context);
                },
              ),
            )
          ],
        );
      });

CodePudding user response:

Using enter image description here

If you don't want the divider between actions you have to create your own custom popup.

  • Related