RITLAlertStyle constructor

const RITLAlertStyle({
  1. Color backgroundColor = CupertinoColors.white,
  2. Color separateColor = const Color.fromRGBO(247, 247, 247, 1),
  3. BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8)),
  4. TextStyle titleStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Color.fromRGBO(77, 76, 77, 1)),
  5. TextAlign titleTextAlign = TextAlign.center,
  6. TextStyle messageStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color.fromRGBO(88, 89, 89, 1)),
  7. TextAlign messageTextAlign = TextAlign.center,
  8. BoxConstraints? constraints,
  9. EdgeInsets alertPadding = const EdgeInsets.fromLTRB(15, 15, 15, 0),
  10. AlignmentGeometry alertAlignment = Alignment.center,
})

Alert style constructor function The backgroundColor parameter sets the background color. The separateColor parameter sets the button's separate color. The borderRadius parameter sets alert's borderRadius. default is 8 The titleStyle parameter sets alert title text style. The titleTextAlign parameter sets alignment of the title. The messageStyle parameter sets alert desc text style. The messageTextAlign parameter sets alignment of the desc. The constraints parameter sets Alert size. The alertPadding parameter sets alert area padding. The alertAlignment parameter sets alert area alignment.

Implementation

const RITLAlertStyle({
  this.backgroundColor = CupertinoColors.white,
  this.separateColor = const Color.fromRGBO(247, 247, 247, 1),
  this.borderRadius = const BorderRadius.all(Radius.circular(8)),
  this.titleStyle = const TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.w500,
    color: Color.fromRGBO(77, 76, 77, 1),
  ),
  this.titleTextAlign = TextAlign.center,
  this.messageStyle = const TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w400,
    color: Color.fromRGBO(88, 89, 89, 1),
  ),
  this.messageTextAlign = TextAlign.center,
  // this.buttonAreaPadding = const EdgeInsets.all(20.0),
  this.constraints,
  // this.buttonsDirection = ButtonsDirection.row,
  // this.alertElevation,
  this.alertPadding = const EdgeInsets.fromLTRB(15, 15, 15, 0),
  //alert的参考点
  this.alertAlignment = Alignment.center,
});