Package selection guidance compiled from public package information, community data, and project usage.
Responsive_Framework is a Flutter package that simplifies creating responsive user interfaces across various screen sizes and platforms. It provides intuitive tools to automatically adapt layouts, fonts, and spacing based on device dimensions. With built-in breakpoints and flexible design patterns, developers can build consistent UIs for Android, iOS, Web, macOS, Windows, and Linux without writing complex media queries. The package integrates seamlessly into existing projects and enhances cross-platform compatibility.
Use cases
Building cross-platform apps with consistent layouts
Adapting UIs for different screen sizes
Creating scalable designs for mobile and web
Simplifying responsive typography
Designing adaptive grid systems
Ensuring UI consistency across devices
Key features
Automatic layout adaptation
Built-in responsive breakpoints
Cross-platform support
Easy integration with existing code
Flexible sizing and spacing controls
Support for all major Flutter platforms
Suitable for
Flutter developers seeking responsive UIs
Teams building multi-platform applications
Projects requiring dynamic layout adjustments
Developers wanting to reduce boilerplate code
Apps targeting diverse screen sizes
Considerations
May require initial learning curve for new users
Depends on proper configuration of breakpoints
Best suited for apps with predictable layout needs
Limited customization for highly complex layouts
Not ideal for static, non-responsive designs
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Responsive Framework
Responsiveness made simple
The Responsive Framework includes widgets that help developers build responsive apps for mobile, desktop, and website layouts.
Use the labels you defined for layouts and values.
// Example: if the screen is bigger than the Mobile breakpoint, build full width AppBar icons and labels.if (ResponsiveBreakpoints.of(context).largerThan(MOBILE))
FullWidthAppBarItems()
// BooleansResponsiveBreakpoints.of(context).isDesktop;
ResponsiveBreakpoints.of(context).isTablet;
ResponsiveBreakpoints.of(context).isMobile;
ResponsiveBreakpoints.of(context).isPhone;
// ConditionalsResponsiveBreakpoints.of(context).equals(DESKTOP)
ResponsiveBreakpoints.of(context).largerThan(MOBILE)
ResponsiveBreakpoints.of(context).smallerThan(TABLET)
ResponsiveBreakpoints.of(context).between(MOBILE, TABLET)
...
Customization
You can define your own breakpoint labels and use them in your conditionals.
For example, if you're building a Material 3 Navigation Rail and want to expand the menu to full width once there is enough room, you can add a custom EXPAND_SIDE_PANEL breakpoint.
The ResponsiveFramework includes a few custom widgets that supplement Flutter's responsive capabilities. Their usages are showcased in the demo projects.
The remainder of the legacy ReadMe is preserved below as the concepts are still useful and used by the new widgets. ResponsiveWrapper has been deprecated and removed.
The Problem
Supporting multiple display sizes often means recreating the same layout multiple times. Under the traditional Bootstrap approach, building responsive UI is time consuming, frustrating and repetitive. Furthermore, getting everything pixel perfect is near impossible and simple edits take hours.
The Solution
Use Responsive Framework to automatically scale your UI.
ResponsiveBreakpoint.autoScale(600);
AutoScale
AutoScale shrinks and expands your layout proportionally, preserving the exact look of your UI.
This eliminates the need to manually adapt layouts to mobile, tablet, and desktop.
ResponsiveBreakpoint.autoScale(600);
Flutter's default behavior is resize which Responsive Framework respects. AutoScale is off by default and can be enabled at breakpoints by setting autoScale to true.
Breakpoints
Breakpoints control responsive behavior at different screen sizes.
Breakpoints give you fine-grained control over how your UI displays.
Introductory Concepts
These concepts helps you start using the Responsive Framework and build an responsive app quickly.
Scale vs Resize
Flutter's default behavior is to resize your layout when the screen dimensions change. Resizing a layout stretches it in the direction of an unconstrained width or height. Any constrained dimension stays fixed which is why mobile app UIs look tiny on desktop. The following example illustrates the difference between resizing and scaling.
An AppBar widget looks correct on a phone. When viewed on a desktop however, the AppBar is too short and the title looks too small.
Here is what happens under each behavior:
Resizing (default) - the AppBar's width is double.infinity so it stretches to fill the available width. The Toolbar height is fixed and stays 56dp.
Scaling - the AppBar's width stretches to fill the available width. The height scales proportionally using an aspect ratio automatically calculated from the nearest ResponsiveBreakpoint. As the width increases, the height increases proportionally.
When scaled, the AppBar looks correct on desktop, up to a certain size. Once the screen becomes too wide, the AppBar starts to appear too large. This is where breakpoints come in.
Breakpoint Configuration
To adapt to a wide variety of screen sizes, set breakpoints to control responsive behavior.
No project wiki exists yet unfortunately. That means this is an opportunity for you to create and maintain the wiki for one of the most popular Flutter packages. This package needs your help with documentation!
Please reach out via the contact links below if you are interested.
About
Responsive Framework was created out of a desire for a better way to manage responsiveness. The ability to automatically adapt UI to different sizes opens up a world of possibilities. Here at Codelessly, we're building a Flutter app UI and website builder, development tools, and UI templates to increase productivity. If that sounds interesting, you'll want to subscribe to updates below 😎
Responsive Framework is licensed under Zero-Clause BSD and released as Emailware. If you like this project or it helped you, please subscribe to updates. Although it is not required, you might miss the goodies we share!
Badges 🏆
Now you can proudly display the time and headache saved by using Responsive Framework with a supporter's badge.
<ahref="https://github.com/Codelessly/ResponsiveFramework"><imgalt="Built with Responsive Framework"src="https://raw.githubusercontent.com/Codelessly/ResponsiveFramework/master/packages/Built%20with%20Responsive%20Badge.png"/></a>
Flutter is a game-changing technology that will revolutionize not just development, but software itself. A big thank you to the Flutter team for building such an amazing platform 💙