【发布时间】:2019-08-06 09:35:46
【问题描述】:
我正在使用 NetworkGiffyDialog 自定义 alertdialog 但它会出现黑屏背景,有时应用程序会崩溃 问题在这里:
onOkButtonPressed: () { Navigator.of(context).pop();
我调用的函数:
void showAlert(BuildContext context, String txt, String logo) {
showDialog(
context: context,
builder: (_) => NetworkGiffyDialog(
image: Image.asset("Assets/" + logo + ".gif"),
title: Text('Produit Radar',
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600)),
description: Text(
txt,
textAlign: TextAlign.center,
),
onOkButtonPressed: () {
Navigator.of(context).pop();
},
));
}
【问题讨论】:
标签: flutter