容器BorderRadius.circular不起作用(颤振)

时间:2020-11-01 20:47:08

标签: flutter dart containers

我要在下面为图像的边缘加上边框

enter image description here

但是,尽管我在代码中添加了修饰,但是边框代码却不起作用。你能告诉我我哪里出问题了吗? 这是我的代码;

 Container(
                              height: 130,
                              decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(15.0),
                              ),
                              child: Padding(
                                padding: const EdgeInsets.all(8.0),
                                child: Column(
                                  children: [
                                    MaterialButton(
                                      onPressed: () async {},
                                      padding:
                                          EdgeInsets.only(top: 5, bottom: 5),
                                      child: Row(
                                        children: [
                                          Text(
                                            'Call Center',
                                            style: TextStyle(fontSize: 14),
                                          ),
                                        ],
                                      ),
                                    ),
                                    Center(
                                      child: MaterialButton(
                                        onPressed: () {
                                          Navigator.pushNamed(
                                              context, ContactUsPage.routeName);
                                        },
                                        padding:
                                            EdgeInsets.only(top: 5, bottom: 5),
                                        child: Row(
                                          children: [
                                            Text(
                                              'WhatsApp',
                                              style: TextStyle(fontSize: 14),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ],
                                ),
                              ),
                            )

1 个答案:

答案 0 :(得分:0)

您要致电showBottomSheet()来显示此内容吗?如果是这样,则有一个shape参数。