選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

59 行
1.6 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:qadirneyriz/widgets/ink_warpper.dart';
  3. class CheckBoxInTile extends StatelessWidget {
  4. final void Function()? onTap;
  5. final String text;
  6. final bool hasIcon;
  7. final Color backColor;
  8. final Color textColor;
  9. const CheckBoxInTile({
  10. Key? key,
  11. this.onTap,
  12. required this.text,
  13. required this.hasIcon,
  14. required this.backColor,
  15. required this.textColor,
  16. }) : super(key: key);
  17. @override
  18. Widget build(BuildContext context) {
  19. return Padding(
  20. padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
  21. child: InkWrapper(
  22. borderRadius: 10,
  23. onTap: onTap,
  24. child: Container(
  25. decoration: BoxDecoration(boxShadow: [
  26. BoxShadow(
  27. color: Colors.black12,
  28. blurRadius: 8,
  29. offset: Offset(0, 4),
  30. ),
  31. ], color: backColor, borderRadius: BorderRadius.circular(10)),
  32. child: Padding(
  33. padding: const EdgeInsets.all(10.0),
  34. child: Row(
  35. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  36. children: [
  37. Expanded(
  38. child: Text(
  39. maxLines: 1,
  40. overflow: TextOverflow.ellipsis,
  41. text,
  42. style: TextStyle(color: textColor, fontSize: 12),
  43. ),
  44. ),
  45. if (hasIcon)
  46. Icon(Icons.add_circle_outline,
  47. color: Colors.black.withOpacity(.3))
  48. ],
  49. ),
  50. ),
  51. ),
  52. ),
  53. );
  54. }
  55. }