flutter_constraintlayout
1.7.0-stable, released 3 years ago by flutterfirst.cn
Build flexible, flat layout hierarchies with constraints similar to Android's ConstraintLayout.
WASM-ready
What it does
Provides a powerful Stack-like widget that allows building complex layouts using directional constraints relative to parents, siblings, or IDs. Features O(n) layout time complexity without requiring linear equation solving.
AI-written summary of version 1.7.0-stable, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to avoid deep nesting ('nested hell') in complex Flutter layouts.
- You want precise control over element positioning using relative constraints and biases.
Skip it when
- You need built-in layout chains (not yet natively supported).
- You require two-way constraints between child elements directly.
Strengths
- O(n) layout time complexity with high performance.
- Extensive feature set including guidelines, barriers, percentage layout, and grid helpers.
- Flat code hierarchy reduces build and render times.
Weaknesses
- Constraints are strictly one-way.
- Chains are not yet natively supported.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Not documented
Container(
color: Colors.red,
).applyConstraint(
size: 200,
centerTo: parent,
);Alternatives
Packages that do the same job and could replace flutter_constraintlayout.
- custom_adaptive_scaffold
Drop-in adaptive Material 3 scaffolding and responsive layout widgets for Flutter apps.
76Compare