提交 8530d98d authored 作者: shixiaochen's avatar shixiaochen

1、增加onFinishPage回调方法(页面关闭);

上级 78f87e1e
......@@ -18,8 +18,9 @@ import '../utils/toast_util.dart';
/// 反馈投诉
class ComplaintWebPage extends StatefulWidget {
final String? url; // 网页地址
final VoidCallback? onFinishPage; // 关闭页面回调方法
const ComplaintWebPage({super.key, required this.url});
const ComplaintWebPage({super.key, required this.url, this.onFinishPage});
@override
State<ComplaintWebPage> createState() => _ComplaintWebPageState();
......@@ -199,6 +200,7 @@ class _ComplaintWebPageState extends State<ComplaintWebPage> {
_finishPage(String? msg) {
debugPrint("finishPage:");
Navigator.pop(context);
widget.onFinishPage?.call();
}
/// 展示toast
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论