Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.27k stars 151 forks source link

How to deal with opening `dialogs` #133

Open nietsmmar opened 1 year ago

nietsmmar commented 1 year ago

I am using showDialog() to display modals. How can I make sure, they are responsive too?

rayliverified commented 1 year ago

Good news! If you use the builder property in MaterialApp, all ModalRoutes (including dialogs), will be wrapped with the builder.

If you pass ResponsiveBreakpoints.builder() to the builder property like in the example, your dialog has access to the breakpoints as well.

Hopefully I'm not wrong, I'll need to double check.

Flutter Documentation: snap_screen_20230426011343

nietsmmar commented 1 year ago

@rayliverified Do you have an example?

angelocordero commented 4 months ago

@rayliverified is there any updates on this? dialogs does not scale with the rest of the app