TDAlertDialog constructor

const TDAlertDialog({
  1. Key? key,
  2. Color backgroundColor = Colors.white,
  3. double radius = 12.0,
  4. String? title,
  5. Color titleColor = const Color(0xE6000000),
  6. String? content,
  7. Color? contentColor,
  8. double contentMaxHeight = 0,
  9. TDDialogButtonOptions? leftBtn,
  10. TDDialogButtonOptions? rightBtn,
  11. bool? showCloseButton,
  12. TDDialogButtonStyle buttonStyle = TDDialogButtonStyle.normal,
})

横向按钮排列的对话框

leftBtnrightBtn不传style参数会应用默认样式,左侧弱按钮,右侧强按钮

Implementation

const TDAlertDialog({
  Key? key,
  this.backgroundColor = Colors.white,
  this.radius = 12.0,
  this.title,
  this.titleColor = const Color(0xE6000000),
  this.content,
  this.contentColor,
  this.contentMaxHeight = 0,
  this.leftBtn,
  this.rightBtn,
  this.showCloseButton,
  TDDialogButtonStyle buttonStyle = TDDialogButtonStyle.normal,
})  : assert((title != null || content != null)),
      _vertical = false,
      _buttons = null,
      _buttonStyle = buttonStyle,
      super(key: key);