CreateSureAndCannerBtnWidget function

dynamic CreateSureAndCannerBtnWidget({
  1. String? cannermsg,
  2. String? suremsg,
  3. Color? surebackgrounColor,
  4. Widget? sureWidget,
  5. Widget? cannerWidget,
  6. int btntype = 1,
  7. dynamic ontapsure()?,
  8. dynamic ontapcanner()?,
})

Implementation

CreateSureAndCannerBtnWidget({
  String? cannermsg,
  String? suremsg,
  Color? surebackgrounColor,
  Widget? sureWidget,
  Widget? cannerWidget,
  int btntype = 1,
  Function()? ontapsure,
  Function()? ontapcanner,
}) {
  return Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
      btntype == 1
          ? cannerWidget ??
              BtnItemWidget(
                BtnlayoutType.text,
                title: Container(
                  alignment: Alignment.center,
                  width: 118.w,
                  height: 40.w,
                  decoration: BoxDecoration(
                    color: CommentColorS.colf5f5f5,
                    borderRadius: BorderRadius.all(
                      Radius.circular(20.r),
                    ),
                  ),
                  child: Text(
                    cannermsg ?? "",
                    style: TextStyleMacor.fontBold(14, CommentColorS.col999999),
                  ),
                ),
                ontap: () {
                  if (ontapcanner != null) {
                    ontapcanner();
                  }
                },
              )
          : Container(),
      sureWidget ??
          BtnItemWidget(
            BtnlayoutType.text,
            title: Container(
              alignment: Alignment.center,
              width: 118.w,
              height: 40.w,
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(
                    Radius.circular(20.r),
                  ),
                  color: surebackgrounColor ?? CommentColorS.col2865ff),
              child: Text(
                suremsg ?? "",
                style: TextStyleMacor.fontBold(14, CommentColorS.colffffff),
              ),
            ),
            ontap: () {
              if (ontapsure != null) {
                ontapsure();
              }
            },
          )
    ],
  );
}