showTicker static method

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

Implementation

static void showTicker(
  BuildContext context, {
  String? title,
  bool showClose = false,
  dynamic content,
  dynamic action = 'Confirm',
  int secondsToAction = 3,
  Color? actionBgColor,
  Color? actionTextColor,
  VoidCallback? onActionPress,
  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: action,
              cancelBgColor: actionBgColor,
              cancelOnPress: onActionPress,
              cancelTextColor: actionTextColor,
              second: secondsToAction,
            ),
            shape: RoundedRectangleBorder(borderRadius: _borderRadius),
          ),
        );
      });
}