showTicker static method

void showTicker(
  1. BuildContext context, {
  2. String? title,
  3. bool showClose = false,
  4. dynamic content,
  5. dynamic confirm = 'Confirm',
  6. int secondsToAction = 3,
  7. Color? confirmBgColor,
  8. Color? confirmTextColor,
  9. VoidCallback? onConfirmPress,
  10. bool barrierDismissible = true,
})

Implementation

static void showTicker(
  BuildContext context, {
  String? title,
  bool showClose = false,
  dynamic content,
  dynamic confirm = 'Confirm',
  int secondsToAction = 3,
  Color? confirmBgColor,
  Color? confirmTextColor,
  VoidCallback? onConfirmPress,
  bool barrierDismissible = true,
}) {
  showDialog(
      context: context,
      barrierDismissible: barrierDismissible,
      builder: (context) {
        return WillPopScope(
          onWillPop: () async => barrierDismissible,
          child: AlertDialog(
            contentPadding: EdgeInsets.zero,
            content: _VxDialog(
              title: title,
              showClose: showClose,
              content: content,
              cancel: confirm,
              cancelBgColor: confirmBgColor,
              cancelOnPress: onConfirmPress,
              second: secondsToAction,
            ),
            shape: RoundedRectangleBorder(borderRadius: _borderRadius),
          ),
        );
      });
}