getActions method

List<Widget> getActions()

Implementation

List<Widget> getActions(){
  var yes = yesStr ?? '确定';
  var no = noStr ?? '取消';
  return [
    Visibility(
      visible: !hintNo,
      child: RawMaterialButton(
          constraints: BoxConstraints.tightFor(width: ('$no'.length + 2) * 14, height: 30.w),
          child: Text(no,style: text_grey_14),
          onPressed: ()=> {
            if(noFun != null) {
              noFun()
            },
            if(clickNoToDissmiss){
              Get.back()
            }
          }
      ),
    ),
    Visibility(
      visible: !hintYes,
      child: RawMaterialButton(
        constraints: BoxConstraints.tightFor(width: ('$yes'.length + 2) * 14, height: 30.w),
        child: Text(yes,style: text_main_14),
        onPressed: ()=> {
          if(yesFun != null) {
            yesFun()
          },
          if(clickYesToDissmiss){
            Get.back()
          }
        },
      ),
    ),
    SizedBox(width: 10.w),
  ];
}