import 'package:flutter/material.dart'; import 'package:qadirneyriz/widgets/ink_warpper.dart'; class CheckBoxInTile extends StatelessWidget { final void Function()? onTap; final String text; final bool hasIcon; final Color backColor; final Color textColor; const CheckBoxInTile({ Key? key, this.onTap, required this.text, required this.hasIcon, required this.backColor, required this.textColor, }) : super(key: key); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), child: InkWrapper( borderRadius: 10, onTap: onTap, child: Container( decoration: BoxDecoration(boxShadow: [ BoxShadow( color: Colors.black12, blurRadius: 8, offset: Offset(0, 4), ), ], color: backColor, borderRadius: BorderRadius.circular(10)), child: Padding( padding: const EdgeInsets.all(10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Text( maxLines: 1, overflow: TextOverflow.ellipsis, text, style: TextStyle(color: textColor, fontSize: 12), ), ), if (hasIcon) Icon(Icons.add_circle_outline, color: Colors.black.withOpacity(.3)) ], ), ), ), ), ); } }