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,18 +1664,19 @@ 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, child: SingleChildScrollView(
24, padding: const EdgeInsets.fromLTRB(24, 24, 24, 24),
24 + MediaQuery.of(context).padding.bottom, child: _success ? _buildSuccessContent() : _buildFormContent(),
), ),
child: SingleChildScrollView(
child: _success ? _buildSuccessContent() : _buildFormContent(),
), ),
), ),
); );
@@ -1860,19 +1861,25 @@ 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: Text( child: FittedBox(
_isSubmitting ? 'Sending...' : 'Send Request', fit: BoxFit.scaleDown,
style: const TextStyle( child: Text(
fontFamily: 'Fractul', _isSubmitting ? 'Sending...' : 'Send Request',
fontSize: 14, style: const TextStyle(
fontWeight: FontWeight.w600, fontFamily: 'Fractul',
color: Colors.white, fontSize: 14,
fontWeight: FontWeight.w600,
color: Colors.white,
),
), ),
), ),
), ),