大家好,我有这个包含 3 个按钮的简单代码
void _showOptions (bill , context){
Alert(
context: context,
type: AlertType.info,
style: AlertStyle(titleStyle: Theme.of(context).textTheme.bodyText1),
title: translator.currentLanguage == 'ar' ? 'الخيارات'
: 'Options',
buttons: [
DialogButton(
onPressed: (){
Navigator.push(context,
MaterialPageRoute(builder: (BuildContext context) =>
BillView(widget.userInformation , widget.userInformation, bill))
);
},
color: Color(0xffff9900),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(translator.translate("view_bill"), style: TextStyle(color: Colors.white)),
SizedBox(width: 5,),
Icon(Icons.featured_play_list , color: Colors.white,)
],
),
),
DialogButton(
onPressed: (){
Navigator.push(context,
MaterialPageRoute(builder: (BuildContext context) =>
PurchasesEdit(widget.userInformation , widget.userInformation, bill))
);
},
color: Colors.blue,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(translator.translate("edit"), style: TextStyle(color: Colors.white)),
SizedBox(width: 5,),
Icon(Icons.edit , color: Colors.white,)
],
),
),
DialogButton(
onPressed: (){
return _deleteBill(bill['id'] , context);
},
color: Colors.red,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(translator.translate("delete"), style: TextStyle(color: Colors.white)),
SizedBox(width: 5,),
Icon(Icons.delete_forever , color: Colors.white,)
],
),
),
],
).show();
}
它工作正常,但三个按钮彼此相邻,我希望其中一个在底部,另外两个在顶部
现在的结果
查看 -- 编辑 -- 删除
我想要的是
编辑——删除
- - 看法 - - -
我该怎么做?
提前致谢