flutter corner radius with transparent background

后端 未结 11 1211
鱼传尺愫
鱼传尺愫 2021-01-30 15:28

Below is my code which I expect to render a round-corner container with a transparent background.

return new Container(
                //padding: const EdgeIn         


        
11条回答
  •  天命终不由人
    2021-01-30 16:10

    Use transparent background color for the modalbottomsheet and give separate color for box decoration


       showModalBottomSheet(
          backgroundColor: Colors.transparent,
          context: context, builder: (context) {
        return Container(
    
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.only(
                topLeft:Radius.circular(40) ,
                topRight: Radius.circular(40)
            ),
          ),
          padding: EdgeInsets.symmetric(vertical: 20,horizontal: 60),
          child: Settings_Form(),
        );
      });
    

提交回复
热议问题