我已经sweetalert
在我的项目中应用了我的应用程序是横向的并sweetalert
全屏显示我想将自定义宽度和高度设置为sweetalert
.
SweetAlert.show(context,
title: "Just show a message",
subtitle: "Sweet alert is pretty",
style: SweetAlertStyle.confirm,
showCancelButton: true, onPress: (bool isConfirm) {
if (isConfirm) {
SweetAlert.show(context,style: SweetAlertStyle.success,title: "Success");
// return false to keep dialog
return false;
}
});
根据我对您的问题的评估,没有任何选择。但我认为这rflutter_alert
是最好的选择,而不是在sweetalert
这里你可以使用宽度和高度来自定义它。希望这会帮助你。您可以在按钮中添加多个按钮:[],
import 'package:rflutter_alert/rflutter_alert.dart';
Alert(
context: context,
type: AlertType.error,
title: "RFLUTTER ALERT",
desc: "Flutter is more awesome with RFlutter Alert.",
buttons: [
DialogButton(
child: Text(
"COOL",
style: TextStyle(color: Colors.white, fontSize: 20),
),
onPressed: () => Navigator.pop(context),
width: 120,
)
],
).show();
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句