From d3f49565d3016fc3553d752b1772be0342ad702c Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sat, 14 Mar 2026 23:46:22 +0530 Subject: [PATCH] feat: Enhance contact agent bottom sheet layout with max height and safe area, and refine send request button styling. --- .../screens/agent_detail_screen.dart | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/lib/features/agents/presentation/screens/agent_detail_screen.dart b/lib/features/agents/presentation/screens/agent_detail_screen.dart index 87f9fc4..b3caf07 100644 --- a/lib/features/agents/presentation/screens/agent_detail_screen.dart +++ b/lib/features/agents/presentation/screens/agent_detail_screen.dart @@ -1664,18 +1664,19 @@ class _ConnectModalContentState extends State<_ConnectModalContent> { return Padding( padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), child: Container( + constraints: BoxConstraints( + maxHeight: MediaQuery.of(context).size.height * 0.85, + ), decoration: const BoxDecoration( color: Colors.white, borderRadius: BorderRadius.vertical(top: Radius.circular(20)), ), - padding: EdgeInsets.fromLTRB( - 24, - 24, - 24, - 24 + MediaQuery.of(context).padding.bottom, - ), - child: SingleChildScrollView( - child: _success ? _buildSuccessContent() : _buildFormContent(), + child: SafeArea( + top: false, + child: SingleChildScrollView( + padding: const EdgeInsets.fromLTRB(24, 24, 24, 24), + child: _success ? _buildSuccessContent() : _buildFormContent(), + ), ), ), ); @@ -1860,19 +1861,25 @@ class _ConnectModalContentState extends State<_ConnectModalContent> { onPressed: _isSubmitting ? null : _handleSend, style: ElevatedButton.styleFrom( backgroundColor: AppColors.accentOrange, + foregroundColor: Colors.white, disabledBackgroundColor: AppColors.accentOrange.withValues(alpha: 0.5), + disabledForegroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(24), ), + padding: const EdgeInsets.symmetric(horizontal: 16), ), - child: Text( - _isSubmitting ? 'Sending...' : 'Send Request', - style: const TextStyle( - fontFamily: 'Fractul', - fontSize: 14, - fontWeight: FontWeight.w600, - color: Colors.white, + child: FittedBox( + fit: BoxFit.scaleDown, + child: Text( + _isSubmitting ? 'Sending...' : 'Send Request', + style: const TextStyle( + fontFamily: 'Fractul', + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.white, + ), ), ), ),