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.28k stars 150 forks source link

ResponsiveBreakpoints.of(context) not working #146

Open AngelaDevDesign opened 1 year ago

AngelaDevDesign commented 1 year ago

When trying to use a condition for returning a specific widget ResponsiveBreakpoints.of(context).isDesktop is not working as it says there is no definition for that variable.

Is there any other code for using conditionals?

rayliverified commented 1 year ago

Ah, that's because you haven't defined a DESKTOP breakpoint value.

const Breakpoint(start: 801, end: 1920, name: DESKTOP),

I can see how this is confusing.

Changing to return false instead of crashing.