Answers for "showModalBottomSheet flutter"

0

flutter showbottomsheet vs showmodalbottomsheet

showModalBottomSheet(
  backgroundColor: Colors.transparent,
  context: context,
  isScrollControlled: true,
  isDismissible: true,
  builder: (BuildContext context) {
    return DraggableScrollableSheet(
      initialChildSize: 0.75, //set this as you want
      maxChildSize: 0.75, //set this as you want
      minChildSize: 0.75, //set this as you want
      expand: true,
      builder: (context, scrollController) {
        return Container(...); //whatever you're returning, does not have to be a Container
      }
    );
  }
)
Posted by: Guest on March-14-2021
4

flutter showmodalbottomsheet

showModalBottomSheet(
        context: context,
        builder: (context) {
          return Wrap(
            children: const [
              ListTile(
                leading: Icon(Icons.share),
                title: Text('Share'),
              ),
              ListTile(
                leading: Icon(Icons.link),
                title: Text('Get link'),
              ),
              ListTile(
                leading: Icon(Icons.edit),
                title: Text('Edit name'),
              ),
              ListTile(
                leading: Icon(Icons.delete),
                title: Text('Delete collection'),
              ),
            ],
          );
        });
Posted by: Guest on August-23-2021
0

how to custom showmodalbottomsheet in flutter site:stackoverflow.com

void _modalBottomSheetMenu(){
        showModalBottomSheet(
            context: context,
            builder: (builder){
              return new Container(
                height: 350.0,
                color: Colors.transparent, //could change this to Color(0xFF737373), 
                           //so you don't have to change MaterialApp canvasColor
                child: new Container(
                    decoration: new BoxDecoration(
                        color: Colors.white,
                        borderRadius: new BorderRadius.only(
                            topLeft: const Radius.circular(10.0),
                            topRight: const Radius.circular(10.0))),
                    child: new Center(
                      child: new Text("This is a modal sheet"),
                    )),
              );
            }
        );
      }
Posted by: Guest on January-08-2021

Code answers related to "showModalBottomSheet flutter"

Browse Popular Code Answers by Language