A super powerful Stack, build flexible layouts with constraints. Similar to ConstraintLayout for Android and AutoLayout for iOS. But the code implementation is much more efficient, it has O(n) layout time complexity and no linear equation solving is required.
MIT License
489
stars
36
forks
source link
margin left not work, when centerHorizontalTo parent #13
Widget addressView() { return Text( '当前位置:地址1111111111111111111100000002222222222222222222222222220000000', textAlign: TextAlign.center, style: TextStyle(fontSize: 12), ).applyConstraint( id: address, centerHorizontalTo: parent, top: center.bottom, margin: const EdgeInsets.only(top: 24, left: 50,right: 50), ); }