Adaptive and responsive design in Flutter
One of Flutter's primary goals is to create a framework that allows you to develop apps from a single codebase that look and feel great on any platform.
This means that your app might appear on screens of many different sizes, from a watch, to a foldable phone with two screens, to a high definition monitor. And your input device might be a physical or virtual keyboard, a mouse, a touchscreen, or any number of other devices.
Two terms that describe these design concepts are adaptive and responsive. Ideally, you'd want your app to be both but what, exactly, does this mean?
What is responsive vs adaptive?
#An easy way to think about it is that responsive design is about fitting the UI into the space and adaptive design is about the UI being usable in the space.
So, a responsive app adjusts the placement of design elements to fit the available space. And an adaptive app selects the appropriate layout and input devices to be usable in the available space. For example, should a tablet UI use bottom navigation or side-panel navigation?
This section covers various aspects of adaptive and responsive design:
- General approach
- SafeArea & MediaQuery
- Large screens & foldables
- User input & accessibility
- Capabilities & policies
- Best practices for adaptive apps
- Additional resources
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2024-07-06。 查看文档源码 或者 为本页面内容提出建议。