1.自定义提示框
void _purchase(context, status) {
showDialog(
// 传入 context
context: context,
// 构建 Dialog 的视图
builder: (_) => Container(
padding: EdgeInsets.symmetric(
horizontal: 40, vertical: ScreenUtil.screenHeight / 3),
child: Stack(
children: <Widget>[
Positioned(
child: Container(
height: 167,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(5))),
child: Column(
children: <Widget>[
SizedBox(
height: 20,
),
Text(
'${status == '1' ? '取消发布' : '是否重新发布'}',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Color(0XFF333333),
decoration: TextDecoration.none),
),
SizedBox(
height: 20,
),
status == '1'
? Container(
padding: EdgeInsets.symmetric(horizontal: 21),
child: Text(
'取消发布后,您的求购信息将不可见,您可以在取消后重新发布。 ',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Color(0XFF333333),
decoration: TextDecoration.none),
),
)
: Container(),
SizedBox(
height: 20,
),
MdGaps.line,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: 21),
child: Text(
'关闭 ',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
color: Color(0XFF333333),
decoration: TextDecoration.none),
),
),
),
Container(
color: Color(0XFFEEEEEE),
width: 2,
height: 36,