flutter corner radius with transparent background

If you wrap your Container with rounded corners inside of a parent with the background color set to Colors.transparent I think that does what you’re looking for. If you’re using a Scaffold the default background color is white. Change that to Colors.transparent if that achieves what you want.

        new Container(
          height: 300.0,
          color: Colors.transparent,
          child: new Container(
            decoration: new BoxDecoration(
              color: Colors.green,
              borderRadius: new BorderRadius.only(
                topLeft: const Radius.circular(40.0),
                topRight: const Radius.circular(40.0),
            child: new Center(
            child: new Text("Hi modal sheet"),

Leave a Comment