showInfoDialog static method

dynamic showInfoDialog({
  1. required BuildContext context,
  2. String? title,
  3. dynamic tap()?,
  4. String? desc,
  5. String? btn,
})

Implementation

static showInfoDialog(
    {required BuildContext context,
    String? title,
    Function()? tap,
    String? desc,
    String? btn}) async {
  await dialog(
      context: context,
      child: Column(
        children: [
          const SizedBox(
            height: 10,
          ),
          Text(desc ?? ''),
          const SizedBox(
            height: 10,
          ),
          CupertinoButton.filled(
              child: Text(btn ?? 'OK'),
              onPressed: () {
                Navigator.pop(context);
                tap?.call();
              }),
          const SizedBox(
            height: 10,
          ),
        ],
      ),
      title: title);
}