import 'package:flutter/material.dart'; import '../../../../core/theme/design_tokens.dart'; class AccountSectionCard extends StatelessWidget { const AccountSectionCard({ super.key, this.title, this.description, required this.child, this.backgroundColor, this.borderColor, this.contentPadding = const EdgeInsets.all(AppSpacing.lg), }); final String? title; final String? description; final Widget child; final Color? backgroundColor; final Color? borderColor; final EdgeInsetsGeometry contentPadding; @override Widget build(BuildContext context) { final colorScheme = Theme.of(context).colorScheme; return Container( width: double.infinity, padding: contentPadding, decoration: BoxDecoration( color: backgroundColor ?? colorScheme.surface, borderRadius: BorderRadius.circular(AppRadius.xl), border: Border.all(color: borderColor ?? colorScheme.outlineVariant), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (title != null) ...[ Text( title!, style: TextStyle( fontSize: 15, fontWeight: FontWeight.w700, color: colorScheme.onSurface, ), ), ], if (description != null) ...[ const SizedBox(height: AppSpacing.xs), Text( description!, style: TextStyle( fontSize: 13, fontWeight: FontWeight.w500, color: colorScheme.onSurfaceVariant, ), ), ], if (title != null || description != null) const SizedBox(height: AppSpacing.lg), child, ], ), ); } }