import 'package:cims_apps/application/theme/color_palette.dart'; import 'package:flutter/material.dart'; class RadioAgreement extends StatelessWidget { final void Function() onTap; final bool isAgree; final String desc; const RadioAgreement({super.key, required this.isAgree, required this.desc, required this.onTap,}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ GestureDetector( onTap: onTap, child: AnimatedContainer( margin: const EdgeInsets.only(top: 4), duration: const Duration(milliseconds: 200), height: 16, width: 16, padding: const EdgeInsets.all(1), alignment: Alignment.center, decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( color: isAgree ? ColorPalette.primary : ColorPalette.slate200)), child: AnimatedContainer( duration: const Duration(milliseconds: 200), child: Container( decoration: BoxDecoration( color: isAgree ? ColorPalette.primary : ColorPalette.white, shape: BoxShape.circle), ), ), ), ), const SizedBox( width: 12, ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( desc, style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, color: ColorPalette.slate400), ), GestureDetector( onTap: () {}, child: const Text( 'Read More', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, decoration: TextDecoration.underline, color: ColorPalette.primary), )) ], )) ], ), ); } }