Skip to content

Instantly share code, notes, and snippets.

@edemekong
Created January 4, 2022 15:10
Show Gist options
  • Save edemekong/4130fb852aed9135f3766a174f5cddc0 to your computer and use it in GitHub Desktop.
Save edemekong/4130fb852aed9135f3766a174f5cddc0 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'alert_dialog.dart';
Future<bool?> showAlertDialogs(BuildContext context, {required String title, required String content}) async {
bool? response;
await showDialog(
context: context,
builder: (context) => MyAlertDialog(
title: title,
content: content,
buttonText1: 'Yes',
buttonText2: 'No',
callback: (bool v) {
response = v;
},
),
);
return response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment