From 43ce6f8980facb273b1b241b30316390027cf983 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 3 Mar 2021 11:28:06 +0800 Subject: [PATCH] fix delete dialog name --- example/lib/widgets/example_dialog.dart | 2 +- lib/dialog/as_delete_dialog.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/lib/widgets/example_dialog.dart b/example/lib/widgets/example_dialog.dart index f4748c8..e07e5ab 100644 --- a/example/lib/widgets/example_dialog.dart +++ b/example/lib/widgets/example_dialog.dart @@ -38,7 +38,7 @@ class _ExampleDialogState extends State { onPressed: () { Get.dialog(ASDeleteDialog( title: '你确定删除xxx?', - boyd: '你确定删除xxxxxxxxxxxxxxxxxxxxx?', + body: '你确定删除xxxxxxxxxxxxxxxxxxxxx?', onpressed: () {}, )); }), diff --git a/lib/dialog/as_delete_dialog.dart b/lib/dialog/as_delete_dialog.dart index 62b3e26..14f5312 100644 --- a/lib/dialog/as_delete_dialog.dart +++ b/lib/dialog/as_delete_dialog.dart @@ -10,7 +10,7 @@ class ASDeleteDialog extends StatelessWidget { final String title; /// 内容,字符串或widget - final dynamic boyd; + final dynamic body; ///删除按钮 final Widget button; @@ -19,7 +19,7 @@ class ASDeleteDialog extends StatelessWidget { final VoidCallback onpressed; const ASDeleteDialog( - {Key key, this.title, this.boyd, this.button, this.onpressed}) + {Key key, this.title, this.body, this.button, this.onpressed}) : super(key: key); @override @@ -68,15 +68,15 @@ class ASDeleteDialog extends StatelessWidget { fontWeight: FontWeight.bold), ), ), - this.boyd == null + this.body == null ? SizedBox() - : this.boyd is String + : this.body is String ? Text( - this.boyd, + this.body, style: TextStyle( color: kTextSubColor, fontSize: 16.sp), ) - : this.boyd, + : this.body, ], ), ),