text method

Future<void> text({
  1. BuildContext? context,
  2. Widget? content,
  3. Widget? icon,
  4. Widget? title,
})

Implementation

Future<void> text({
  BuildContext? context,
  Widget? content,
  Widget? icon,
  Widget? title,
}) async {
  return await withChild(
    AlertDialog(
      title: title,
      icon: icon,
      content: Padding(padding: const EdgeInsets.all(8), child: content),
      actions: [
        TextButton(
          onPressed: () => navigator(context).pop(),
          child: Text(
            MaterialLocalizations.of(context ?? this.context!).okButtonLabel,
          ),
        ),
      ],
    ),
  ).prompt(context: context);
}