fix delete dialog name

null_safety
小赖 4 years ago
parent 5393481929
commit 43ce6f8980

@ -38,7 +38,7 @@ class _ExampleDialogState extends State<ExampleDialog> {
onPressed: () { onPressed: () {
Get.dialog(ASDeleteDialog( Get.dialog(ASDeleteDialog(
title: '你确定删除xxx', title: '你确定删除xxx',
boyd: '你确定删除xxxxxxxxxxxxxxxxxxxxx', body: '你确定删除xxxxxxxxxxxxxxxxxxxxx',
onpressed: () {}, onpressed: () {},
)); ));
}), }),

@ -10,7 +10,7 @@ class ASDeleteDialog extends StatelessWidget {
final String title; final String title;
/// ,widget /// ,widget
final dynamic boyd; final dynamic body;
/// ///
final Widget button; final Widget button;
@ -19,7 +19,7 @@ class ASDeleteDialog extends StatelessWidget {
final VoidCallback onpressed; final VoidCallback onpressed;
const ASDeleteDialog( 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); : super(key: key);
@override @override
@ -68,15 +68,15 @@ class ASDeleteDialog extends StatelessWidget {
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),
this.boyd == null this.body == null
? SizedBox() ? SizedBox()
: this.boyd is String : this.body is String
? Text( ? Text(
this.boyd, this.body,
style: TextStyle( style: TextStyle(
color: kTextSubColor, fontSize: 16.sp), color: kTextSubColor, fontSize: 16.sp),
) )
: this.boyd, : this.body,
], ],
), ),
), ),

Loading…
Cancel
Save