buildSelectItem method
Widget
buildSelectItem({
- required BoxDecoration decoration,
- double? height,
- bool isSelected = false,
- Color textColor = Colors.white,
- double? textSize,
- GestureTapCallback? onTap,
- EdgeInsetsGeometry? padding,
Implementation
Widget buildSelectItem(
{required BoxDecoration decoration,
double? height,
bool isSelected = false,
Color textColor = Colors.white,
double? textSize,
GestureTapCallback? onTap,
EdgeInsetsGeometry? padding}) {
return Material(
color: Colors.transparent,
child: Ink(
decoration: decoration,
child: InkWell(
onTap: () => onTap?.call(),
child: Container(
height: height ?? 32.h,
padding: padding ?? EdgeInsets.symmetric(horizontal: 32.h),
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
constraints: BoxConstraints(maxWidth: 100.w),
child: Text(this,
textAlign: TextAlign.center,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: textSize ?? 14.sp, color: textColor)),
)
],
),
),
),
),
);
}