showPrimary static method

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

Implementation

static void showPrimary(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.primary, onTap: onTap, closeOnTap: closeOnTap),
  );
}