Skip to content

fix(#1328): resolve RenderFlex overflow in AI dialog on Android#1329

Open
AbdelrahmanELBORGY wants to merge 1 commit intofoss42:mainfrom
AbdelrahmanELBORGY:main
Open

fix(#1328): resolve RenderFlex overflow in AI dialog on Android#1329
AbdelrahmanELBORGY wants to merge 1 commit intofoss42:mainfrom
AbdelrahmanELBORGY:main

Conversation

@AbdelrahmanELBORGY
Copy link
Contributor

@AbdelrahmanELBORGY AbdelrahmanELBORGY commented Mar 11, 2026

PR Description

Root Cause:

The primary crash was caused by a Row layout containing the "Select Model Provider" text and dropdown, which resulted in a horizontal RenderFlex overflow on mobile screens. Additionally, the main dialog Column lacked scrolling capabilities, leading to vertical overflow on shorter devices.

Fix:

  • Converted the Provider selector layout from a Row to a Column to prevent the horizontal RenderFlex crash.
  • Wrapped the main medium-window content in a SingleChildScrollView to allow safe vertical scrolling.
  • Wrapped the ADDropdownButton in a decorated Container to provide a standard UI border, making the dropdown visually distinct.

Visual Proof:

Before (Issue #1328) After (This PR)
after

Related Issues

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

  • Yes
  • No, and this is why: This is purely a UI layout fix for mobile constraints, no core backend or state logic was altered.

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@codealchemist007
Copy link

@AbdelrahmanELBORGY I've just tested this on Android 15 (Redmi) and can confirm that the overflow is resolved. The Row→Column approach works great. Nice catch!

@praaatap
Copy link
Contributor

@AbdelrahmanELBORGY check #1269

@AbdelrahmanELBORGY
Copy link
Contributor Author

@praaatap yes I have seen that after i have submitted my PR, thanks for pointing out brother

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RenderFlex overflow in AI Model Selector dialog on Android

3 participants