dlgConfirm method

Future<bool> dlgConfirm({
  1. required String message,
  2. double? height,
  3. String? title,
  4. double? width,
})

Provides a Yes/No confirmation dialog with the displayed message as the question. True is returned for Yes and False for a No or cancel.

Implementation

Future<bool> dlgConfirm({
  required String message,
  double? height,
  String? title,
  double? width,
}) async {
  return (await dlgCustom<bool?>(
        actions: [
          _buildButton<bool>("Yes", true),
          _buildButton<bool>("No", false),
        ],
        content: Text(
          message,
          softWrap: true,
          overflow: TextOverflow.clip,
          style: TextStyle(color: _getTheme().contentColor),
        ),
        height: height,
        title: title ?? "Confirm",
        width: width,
      )) ??
      false;
}