show method
Display the Dialog window.
Implementation
Future<void> show({
String? title,
Option? button01,
Option? button02,
VoidCallback? press01,
VoidCallback? press02,
bool? switchButtons,
String? msg,
List<Widget>? body,
List<Widget>? actions,
bool? barrierDismissible,
}) {
title = title ?? this.title;
title ??= '';
this.button01 ??= button01;
this.button02 ??= button02;
this.press01 ??= press01;
this.press02 ??= press02;
this.switchButtons ??= switchButtons;
body = body ?? this.body;
body ??= [const SizedBox()];
actions ??= this.actions;
actions ??= _listOptions();
barrierDismissible ??= this.barrierDismissible ?? false;
return showDialog<void>(
context: App.context!,
barrierDismissible: barrierDismissible,
builder: (BuildContext context) => AlertDialog(
title: Text(title!),
content: SingleChildScrollView(
child: ListBody(
children: body!,
),
),
actions: actions,
),
);
}