customWaveDialog function

void customWaveDialog({
  1. required BuildContext context,
})

Implementation

void customWaveDialog({required BuildContext context}){
  showDialog(
    context: context,
    builder: (_) => WillPopScope(
      onWillPop: () async => false,
      child: AlertDialog(
        title: const Text(
          'Informations',
          textAlign: TextAlign.center,
          ),
        content: const Text("Une fois votre paiement effectué, vous serez dirigé sur la page web de confirmation ou d'échec de votre paiement, veuillez revenir sur l'application pour continuer votre parcours",
            textAlign: TextAlign.start,
            ),
        actions: [
          SizedBox(
            width: 100,
            height: 45,
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.resolveWith((states) => mainColor),
                shape: MaterialStateProperty.resolveWith(
                  (states) => RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(5)
                  )
                  )
                ),
              onPressed: (){Navigator.of(context).pop();},
              child: const Text(
                'OK',
                style: TextStyle(color: Colors.white),
                )
              ),
          )
        ],
        actionsAlignment: MainAxisAlignment.center,
      ),
    )
    );
}