Flutter 颤振角半径透明不工作

Flutter 颤振角半径透明不工作,flutter,dart,containers,Flutter,Dart,Containers,下面是我的代码。我要渲染具有透明背景的圆形容器: 我已将颜色添加到父级中,但背景为白色 void _settingModalBottomSheet(context) { showModalBottomSheet( context: context, builder: (BuildContext bc) { return Container( color: Colors.transparent, child:

下面是我的代码。我要渲染具有透明背景的圆形容器:

我已将颜色添加到父级
中,但背景为白色

void _settingModalBottomSheet(context) {
    showModalBottomSheet(
      context: context,
      builder: (BuildContext bc) {
        return Container(
          color: Colors.transparent,
          child: new Container(
              decoration: BoxDecoration(
                color: Color.fromRGBO(253, 126, 118, 1),
                borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(30),
                    topRight: Radius.circular(30)
                ),
              ),
              child: new Wrap(
                children: <Widget>[
                  ..._alerts.map((alert) {
                    return ListTile(
                        title: new Text(
                          alert.title,
                          style: TextStyle(
                              color: Colors.white, 
                              fontSize: 20
                          ),
                        ),
                    );
                  }
                )
              ],
            )
          )
        );
      }
    );
  }
void\u设置ModalBottomSheet(上下文){
showModalBottomSheet(
上下文:上下文,
生成器:(BuildContext bc){
返回容器(
颜色:颜色。透明,
子容器:新容器(
装饰:盒子装饰(
颜色:颜色。来自RGBO(253126118,1),
borderRadius:仅限borderRadius(
左上:半径。圆形(30),
右上角:半径。圆形(30)
),
),
孩子:新包装(
儿童:[
…_alerts.map((警报){
返回列表块(
标题:新文本(
alert.title,
样式:TextStyle(
颜色:颜色,白色,
尺寸:20
),
),
);
}
)
],
)
)
);
}
);
}

您应该使用showModalBottomSheet的背景色

showModalBottomSheet(
                    context: context,
                    backgroundColor: Colors.transparent,
                    builder: (BuildContext bc) {
                             return new Container(
                                      decoration: BoxDecoration(
                                        color: Color.fromRGBO(253, 126, 118, 1),
                                        borderRadius: BorderRadius.only(
                                            topLeft: Radius.circular(30),
                                            topRight: Radius.circular(30)
                                        ),
                                      ),
                                      child: Text(
                                        'ok',
                                        style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 20
                                        ),
                                      )
                                  );
                                }
                            );