message method

Future message({
  1. required BuildContext context,
  2. required PopupType type,
  3. required String title,
  4. required String message,
  5. String? buttonLabel,
  6. Color? buttonColor,
  7. Icon? icon,
})

Implementation

Future<dynamic> message({
  required BuildContext context,
  required PopupType type,
  required String title,
  required String message,
  String? buttonLabel,
  Color? buttonColor,
  Icon? icon,
}) {
  return dialog(
    context: context,
    type: type,
    title: title,
    message: message,
    icon: icon,
    buttons: config.messageButtons ??
        [
          PopupButton(
            label: buttonLabel ?? config.confirmButtonLabel,
            color: buttonColor ?? config.colorByType[type] ?? Colors.blue,
            width: double.infinity,
            onPressed: () {
              Navigator.of(context).pop(true);
            },
          ),
        ],
  );
}