new AlertDialog(
title: new Text('服务热线', style: new TextStyle(fontSize: 17.0,fontWeight: FontWeight.bold)),
content: new SingleChildScrollView(
child: new ListBody(
children: <Widget>[
new Text('确定拨打'+serviceTel+'吗?', style: new TextStyle(fontSize: 15.0)),
],
),
),
actions: <Widget>[
new FlatButton(
child: new Text('取消'),
onPressed: (){
Navigator.of(context).pop();//关闭弹框
},
),
new FlatButton(
child: new Text('拨打'),
onPressed: (){
new Center(
child: new FlatButton(
onPressed: () => launch("tel://14789166666"),//拨打电话
child: new Text("拨打服务热线")),
);
Navigator.of(context).pop();//关闭弹框
},
)
],
);
flutter确认框,flutter 拨打电话
最新推荐文章于 2023-05-14 16:41:34 发布