text method

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

Implementation

Future<void> text({
  BuildContext? context,
  Widget? content,
  Widget? title,
}) async {
  return await withChild(AlertDialog(
    title: title,
    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);
}