import 'package:flutter/material.dart'; import '../../core/theme/app_colors.dart'; class FormSection extends StatelessWidget { final String? title; final Widget? trailing; final List children; const FormSection({ super.key, this.title, this.trailing, required this.children, }); @override Widget build(BuildContext context) { return Container( margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 5), decoration: BoxDecoration( color: AppColors.cardWhite, borderRadius: BorderRadius.circular(10), boxShadow: [ BoxShadow( color: Colors.black.withValues(alpha: 0.04), blurRadius: 4, offset: const Offset(0, 1), ), ], ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (title != null) Padding( padding: const EdgeInsets.fromLTRB(14, 12, 14, 10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( title!, style: const TextStyle( fontSize: 13, fontWeight: FontWeight.w600, color: AppColors.textPrimary, ), ), if (trailing != null) trailing!, ], ), ), ...children, ], ), ); } }