CreateNormalItemWidget function
Widget
CreateNormalItemWidget({
- String? title,
- String? messge,
- bool? isshowline = false,
- dynamic 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,
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()
],
),
),
);
}