khaled-0 / TubeSync

Sync YouTube playlists offline. Because YT Music is too costly
GNU General Public License v3.0
70 stars 5 forks source link

Fix AlertDialog Layout Issue in import_playlist_dialog.dart #1

Closed durul closed 1 week ago

khaled-0 commented 1 week ago

please add description as to what this pr does and how does it improve / fix existing code

durul commented 1 week ago

please add description as to what this pr does and how does it improve / fix existing code

Issue Description

A rendering exception is occurring in the AlertDialog component due to improper layout sizing of a RenderPhysicalShape widget. The widget attempts to paint before its dimensions are properly calculated, causing a layout failure.

Error Message: error_log.txt

RenderBox was not laid out: RenderPhysicalShape#f9904 relayoutBoundary=up2 Failed assertion: line 2164 pos 12: 'hasSize'

This occurs when Flutter tries to paint a widget that hasn't been adequately laid out yet. Looking at the error message, it's happening in an AlertDialog in your import_playlist_dialog.dart file in Android Pixel4.

Additional Notes

This fix addresses the layout assertion error that was preventing the AlertDialog from rendering properly. The changes ensure that all widgets in the component tree have proper size constraints before the paint phase.

khaled-0 commented 1 week ago

LGTM. btw did you AI generate the message

durul commented 1 week ago

LGTM. btw did you AI generate the message

yes I did