fix delete dialog name

null_safety
小赖 4 years ago
parent 5393481929
commit 43ce6f8980

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

@ -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,
],
),
),

Loading…
Cancel
Save