double marginLr = ViewUtils.currentWidth(50.0);
double marginTb = ViewUtils.currentHeight(300.0);
return Container(
color: Color(0x80000000),
child: Container(
padding: EdgeInsets.only(
left: ViewUtils.currentWidth(48.0),
right: ViewUtils.currentWidth(48.0)),
margin: EdgeInsets.only(
top: marginTb, left: marginLr, right: marginLr, bottom: marginTb),
),
);
}
@override
Widget build(BuildContext context) {
double marginLr = ViewUtils.currentWidth(50.0);
double marginTb = ViewUtils.currentHeight(300.0);
return Container(
color: Color(0x80000000),
child: Container(
padding: EdgeInsets.only(
left: ViewUtils.currentWidth(48.0),
right: ViewUtils.currentWidth(48.0)),
margin: EdgeInsets.only(
top: marginTb, left: marginLr, right: marginLr, bottom: marginTb),
decoration: BoxDecoration(//边框颜色+圆角
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(ViewUtils.currentWidth(40.0)),
),
),
),
);</