feat: Enhance contact agent bottom sheet layout with max height and safe area, and refine send request button styling.

This commit is contained in:
pradeepkumar
2026-03-14 23:46:22 +05:30
parent 2198cae027
commit d3f49565d3

View File

@@ -1664,20 +1664,21 @@ class _ConnectModalContentState extends State<_ConnectModalContent> {
return Padding( return Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container( child: Container(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.85,
),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.vertical(top: Radius.circular(20)), borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
), ),
padding: EdgeInsets.fromLTRB( child: SafeArea(
24, top: false,
24,
24,
24 + MediaQuery.of(context).padding.bottom,
),
child: SingleChildScrollView( child: SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(24, 24, 24, 24),
child: _success ? _buildSuccessContent() : _buildFormContent(), child: _success ? _buildSuccessContent() : _buildFormContent(),
), ),
), ),
),
); );
} }
@@ -1860,12 +1861,17 @@ class _ConnectModalContentState extends State<_ConnectModalContent> {
onPressed: _isSubmitting ? null : _handleSend, onPressed: _isSubmitting ? null : _handleSend,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: AppColors.accentOrange, backgroundColor: AppColors.accentOrange,
foregroundColor: Colors.white,
disabledBackgroundColor: disabledBackgroundColor:
AppColors.accentOrange.withValues(alpha: 0.5), AppColors.accentOrange.withValues(alpha: 0.5),
disabledForegroundColor: Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
), ),
padding: const EdgeInsets.symmetric(horizontal: 16),
), ),
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text( child: Text(
_isSubmitting ? 'Sending...' : 'Send Request', _isSubmitting ? 'Sending...' : 'Send Request',
style: const TextStyle( style: const TextStyle(
@@ -1878,6 +1884,7 @@ class _ConnectModalContentState extends State<_ConnectModalContent> {
), ),
), ),
), ),
),
], ],
), ),
], ],