ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

How to deal with opening `dialogs`

Open nietsmmar opened this issue 2 years ago • 3 comments

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

nietsmmar avatar Apr 24 '23 10:04 nietsmmar

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

rayliverified avatar Apr 26 '23 06:04 rayliverified

@rayliverified Do you have an example?

nietsmmar avatar Apr 27 '23 07:04 nietsmmar

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

angelocordero avatar May 17 '24 01:05 angelocordero