【发布时间】:2020-07-11 17:49:25
【问题描述】:
我想创建一个长方形的盒子。我的代码如下。这里 BoxShape 带有下划线,错误消息显示:无法实例化枚举。尝试使用定义的常量之一。我将如何解决这个问题?我想创建一个带有圆形边缘的容器盒。
home: Scaffold(
appBar: AppBar(
backgroundColor:Theme.of(context).primaryColor,
leading:Icon(Icons.arrow_back),
),
body: Scaffold(backgroundColor:Color(0xBBCCE3F0) ,
body: Center(
child: Container(
decoration:new BoxDecoration(
shape:BoxShape(BorderRadius.circular(10.0))
),
color:Colors.white,
child:SizedBox(height:500.0,width:300,
)
【问题讨论】:
-
欢迎来到 StackOverflow。发帖前请阅读How to ask a good question。你的问题已经有了答案here。
标签: flutter