Skip to content

Fix: Replace MediaQuery.removePadding with SafeArea to prevent auto-collapse on keyboard - #19

Open
mdikcinar wants to merge 3 commits into
Creativity-AI-Studio:masterfrom
mdikcinar:fix/mediaquery
Open

Fix: Replace MediaQuery.removePadding with SafeArea to prevent auto-collapse on keyboard#19
mdikcinar wants to merge 3 commits into
Creativity-AI-Studio:masterfrom
mdikcinar:fix/mediaquery

Conversation

@mdikcinar

Copy link
Copy Markdown

🐛 Bug Fix

Problem:

  • SlidingUpPanel was automatically collapsing when keyboard opened
  • MediaQuery.removePadding was causing unnecessary didChangeDependencies calls
  • Performance issues due to excessive widget rebuilds on MediaQuery changes

Solution:

  • Replaced MediaQuery.removePadding with SafeArea(bottom: false)
  • Maintains same functionality (removes bottom padding)
  • Prevents automatic panel collapse on keyboard events
  • Significantly improves performance by reducing MediaQuery-triggered rebuilds

Technical Details:

  • MediaQuery.removePadding creates new MediaQuery context that triggers rebuilds
  • SafeArea(bottom: false) achieves same padding behavior without MediaQuery dependency
  • Fixes keyboard interaction issues in sliding panel components

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.

1 participant