showDanger static method

void showDanger(
  1. String title,
  2. String message, {
  3. dynamic alertPosition = AlertPosition.bottom,
  4. dynamic onTap,
  5. dynamic closeOnTap = false,
})

Implementation

static void showDanger(String title, String message, {alertPosition = AlertPosition.bottom, onTap, closeOnTap = false}) {
  final context = navigatorKey.currentContext;
  final alertState = Provider.of<_AlertState>(context!, listen: false);
  alertState.notify(
    _Alert(title: title, message: message, alertPosition: alertPosition, alertType: AlertType.danger, onTap: onTap, closeOnTap: closeOnTap),
  );
}