PopupConfig constructor

const PopupConfig({
  1. bool isAutoClosed = true,
  2. PopupDesign design = const PopupDesign(),
  3. Size dialogSize = const Size(200, 400),
  4. String confirmButtonLabel = "OK",
  5. String submitButtonLabel = "Submit",
  6. String cancelButtonLabel = "Cancel",
  7. String yesButtonLabel = "Yes",
  8. String noButtonLabel = "No",
  9. List<PopupButton>? questionButtons,
  10. List<PopupButton>? messageButtons,
  11. Color? cancelButtonColor,
  12. int maxShortMessagesLines = 3,
  13. double longMessageGradientFraction = 0.4,
  14. double longMessageHeight = 315,
  15. double shortMessageHeight = 60,
  16. double chooseMessageHeight = 36,
  17. double inputMessageHeight = 40,
  18. Map<PopupType, Icon?> iconByType = const {PopupType.info : Icon(Icons.info, color: Colors.blue, size: 70), PopupType.success : Icon(Icons.check_circle, color: Colors.green, size: 70), PopupType.warning : Icon(Icons.warning, color: Colors.orange, size: 70), PopupType.error : Icon(Icons.error, color: Colors.red, size: 70), PopupType.question : Icon(Icons.question_mark, color: Colors.blue, size: 70)},
  19. Map<PopupType, Color> colorByType = const {PopupType.info : Colors.blue, PopupType.success : Colors.green, PopupType.warning : Colors.orange, PopupType.error : Colors.red, PopupType.question : Colors.blue, PopupType.input : Colors.blue, PopupType.choose : Colors.blue},
})

Implementation

const PopupConfig({
  this.isAutoClosed = true,
  this.design = const PopupDesign(),
  this.dialogSize = const Size(200, 400),
  this.confirmButtonLabel = "OK",
  this.submitButtonLabel = "Submit",
  this.cancelButtonLabel = "Cancel",
  this.yesButtonLabel = "Yes",
  this.noButtonLabel = "No",
  this.questionButtons,
  this.messageButtons,
  this.cancelButtonColor,
  this.maxShortMessagesLines = 3,
  this.longMessageGradientFraction = 0.4,
  this.longMessageHeight = 315,
  this.shortMessageHeight = 60,
  this.chooseMessageHeight = 36,
  this.inputMessageHeight = 40,
  this.iconByType = const {
    PopupType.info: Icon(Icons.info, color: Colors.blue, size: 70),
    PopupType.success: Icon(Icons.check_circle, color: Colors.green, size: 70),
    PopupType.warning: Icon(Icons.warning, color: Colors.orange, size: 70),
    PopupType.error: Icon(Icons.error, color: Colors.red, size: 70),
    PopupType.question: Icon(Icons.question_mark, color: Colors.blue, size: 70),
  },
  this.colorByType = const {
    PopupType.info: Colors.blue,
    PopupType.success: Colors.green,
    PopupType.warning: Colors.orange,
    PopupType.error: Colors.red,
    PopupType.question: Colors.blue,
    PopupType.input: Colors.blue,
    PopupType.choose: Colors.blue,
  },
});