CreateNormalItemWidget function

Widget CreateNormalItemWidget({
  1. String? title,
  2. String? messge,
  3. bool? isshowline = false,
  4. dynamic ontap(
    1. int
    )?,
  5. MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.spaceBetween,
  6. bool? isshownext = false,
  7. int type = 0,
  8. double height = 50,
  9. EdgeInsetsGeometry? padding = const EdgeInsets.only(left: 20),
  10. bool? istap = false,
  11. int? index = 0,
  12. Color? arrowrightColor = CommentColorS.col666666,
  13. Widget? leftwidget,
  14. Widget? rightwidget,
  15. Widget? arrowrightwidget,
  16. Widget? linewidget,
  17. BoxDecoration? decoration,
  18. Color? backgroundColor,
  19. BorderRadius? borderRadius,
})

Implementation

Widget CreateNormalItemWidget({
  String? title,
  String? messge,
  bool? isshowline = false,
  Function(int)? ontap,
  MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.spaceBetween,
  bool? isshownext = false,
  int type = 0,
  double height = 50,
  EdgeInsetsGeometry? padding = const EdgeInsets.only(
    left: 20,
  ),
  bool? istap = false,
  int? index = 0,
  Color? arrowrightColor = CommentColorS.col666666,
  Widget? leftwidget,
  Widget? rightwidget,
  Widget? arrowrightwidget,
  Widget? linewidget,
  BoxDecoration? decoration,
  Color? backgroundColor,
  BorderRadius? borderRadius,
}) {
  return InkWell(
    onTap: () {
      if (ontap != null && istap!) {
        ontap(index!);
      }
    },
    child: Container(
      height: height,
      padding: padding,
      decoration: decoration ??
          BoxDecoration(
            color: backgroundColor ?? Colors.white,
            borderRadius: borderRadius,
          ),
      child: Column(
        children: [
          SizedBox(
            height: height - 0.5,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Expanded(
                  child: Row(
                    mainAxisAlignment: mainAxisAlignment!,
                    children: [
                      leftwidget ??
                          Text(
                            title ?? "",
                            style: TextStyleMacor.fontMedium(
                              14.sp,
                              type == 0
                                  ? CommentColorS.col222222
                                  : CommentColorS.col666666,
                            ),
                          ),
                      rightwidget ??
                          Text(
                            messge ?? "",
                            style: TextStyleMacor.fontMedium(
                              14.sp,
                              CommentColorS.col222222,
                            ),
                          ),
                    ],
                  ),
                ),
                isshownext!
                    ? arrowrightwidget ??
                        Icon(
                          Icons.chevron_right,
                          size: 20.w,
                          color: arrowrightColor,
                        )
                    : Container(),
              ],
            ),
          ),
          isshowline!
              ? linewidget ??
                  CommentTools.configlineSpace(
                    color: CommentColorS.colebebeb,
                  )
              : Container()
        ],
      ),
    ),
  );
}