showSimpleAlert method

void showSimpleAlert(
  1. dynamic context
)

Implementation

void showSimpleAlert(BuildContext context) {
  showDialog(
    context: context,
    builder: (context) => AlertDialog(
      title: Text('Alert'),
      content: Text('This is a simple alert dialog.'),
      actions: [
        TextButton(
          onPressed: () => Navigator.pop(context),
          child: Text('OK'),
        ),
      ],
    ),
  );
}