DSIAlertDialog function

dynamic DSIAlertDialog(
  1. dynamic context,
  2. String text,
  3. Function onPressed
)

Implementation

DSIAlertDialog(context, String text, Function onPressed) {
  showDialog(
    context: context,
    builder: (_) => AlertDialog(
      content: Text(text),
      actions: [
        TextButton(
            onPressed: () {
              onPressed();
            },
            child: Text("OK"))
      ],
    ),
  );
}