Implementieren Sie Designs genau so, wie Ihr Designer beabsichtigt hat. Verwenden Sie entweder die klassische responsive Grid-Ansatz oder gehen Sie mit dem Material Design Layout.
Aus öffentlichen Paketdaten erstellte Orientierung.
Design Grid ist ein Flutter-Paket, das Entwicklern hilft, Designs genau so umzusetzen, wie sie von Designern vorgesehen sind. Es unterstützt sowohl traditionelle responsive Grid-Layouts als auch das Layout-System von Material Design und bietet Flexibilität bei der Erstellung von Benutzeroberflächen. Mit intuitiven APIs vereinfacht es die Ausrichtung, Abstände und reaktive Verhaltensweisen über Plattformen hinweg. Ideal für Teams, die eine visuelle Konsistenz zwischen Design-Mockups und endgültigen App-Interfaces aufrechterhalten möchten. Das Paket ist mit allen wichtigen Flutter-Plattformen kompatibel und gewährleistet eine zuverlässige Cross-Platform-Funktionalität.
Anwendungsfälle
Pixelgenaue Umsetzung von Designs aus Figma oder Sketch
Responsive Layouts für mehrere Bildschirmgrößen erstellen
Integration von Material Design-Richtlinien in benutzerdefinierte Benutzeroberflächen
Konsistente Abstände und Ausrichtung zwischen Widgets erstellen
Die Design-Fidelity in Multiplattform-Apps sicherstellen
Hauptmerkmale
Unterstützt klassische responsive Raster
Integrierte Material-Design-Layout-Unterstützung
Plattformübergreifende Kompatibilität
Flexible Abstand- und Ausrichtungswerkzeuge
Einfache Integration in bestehende Flutter-Projekte
Geeignet für
Frontend-Entwickler, die eng mit Designern zusammenarbeiten
Teams, die auf Designgenauigkeit Wert legen
Projekte, die eine konsistente Benutzeroberfläche auf Geräten erfordern
Entwickler, die Material Design-Prinzipien verwenden
Anwendungen für mehrere Plattformen
Hinweise
Verständnis von Gittersystemen erforderlich
Für komplexe Layouts kann zusätzliche Styling notwendig sein
Am besten in Verbindung mit der Design-System-Dokumentation verwendet
Kein vollständiger UI-Framework – ergänzt bestehende Widgets
Eingeschränkte Anpassung über die Gitterstruktur hinaus
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
Implement designs just like in Figma. Arrange your widgets in a grid and make your designer happy.
Design Grid streamlines your workflow and saves time. Easily configure multiple devices and screen sizes while reducing boilerplate code. Its user-friendly design makes integration effortless, allowing you to focus on your project's core.
The classic use-case of implementing a colum-based design. Use ResponsiveDesignGrid to implement a bootstrap-like design system where every element has a different column-span based on breakpoints.
Need to implement a design based on the strict rules of Material Layout? Use the MaterialDesignGrid to get an exact implementation of the Material Design Layout guide.
Implement a column-based design with different column-spans for every breakpoint.
Responsive design grid widgets can be indefinitely nested.
Create small and clean widgets that use ResponsiveDesignGrid for layout.
They will fit, no matter how deeply nested you use them.
You can customize:
Breakpoints
Column-spacing
Row-spacing
Grid-padding
Amount of columns
Material Design Grid
Implement a design based on the Material Design guidelines.
Material Design Grid is not meant to be used nested.
You can customize:
Breakpoints
Column-spacing
Row-spacing
Grid-padding
Amount of columns per breakpoint
🎉 Getting started
Decide whether you need to use the ResponsiveDesignGrid or the MaterialDesignGrid.
Speak with your designer to build a common understanding.
🏗️ Usage
Responsive Design Grid
ResponsiveDesignGridConfig is required only once in your app, it provides the ResponsiveDesignGridTheme.
You can however always add an extra ResponsiveDesignGridTheme widget if you really need to. Beware, that this is not recommended.
You can nest design grids indefinitely. To keep performance high, make sure to nest them directly in a ResponsiveDesignGridItem.
If you get any errors, you might have to pass the parameter shouldCalculateLayout: true to the ResponsiveDesignGrid widget.
This might happen most likely when the design grid does not get the full width of the app, or if you nested it inside another ResponsiveDesignGridItem and it doesn't get the full width there.
ResponsiveDesignGridRow widget will wrap its children, your rows should have as little children as possible. Avoid large Rows since this will impact performance.
To change the default breakpoints values, you can use the breakpoints property in ResponsiveDesignGridConfig constructor which takes an instance of ResponsiveDesignGridBreakpoints class.
To change the amount of columns, the column spacing, the row spacing or the grid padding, you can use the theme property in ResponsiveDesignGridConfig constructor which takes an instance of ResponsiveDesignGridThemeData class.
MaterialDesignGridTheme is required only once in your app, above the MaterialDesignGrid widget.
MaterialDesignGrid is not meant to be used nested due to material specifications.
MaterialDesignGridRow widget will wrap its children, you should size your rows as small as possible. Avoid large Rows since this will impact performance.
All classes and exposed properties are well documented. If you find the documentation to be lacking, please create an issue 😊
Implementing a custom design grid approach
The base widgets used for both the ResponsiveDesignGrid as well as the MaterialDesignGrid can be found in lib/src/widgets.
You can extend those to create your super-fancy very own custom design grid implementation 🥳.