Crates.io | firmament |
lib.rs | firmament |
version | 0.1.0 |
source | src |
created_at | 2020-09-12 03:37:58.6244 |
updated_at | 2020-09-12 03:37:58.6244 |
description | layout |
homepage | |
repository | |
max_upload_size | |
id | 287616 |
size | 34,093 |
A Rust layout algorithm based on Flutter/Druid/Iced.
https://flutter.dev/docs/development/ui/layout https://flutter.dev/docs/codelabs/layout-basics
impl MainWidget {
fn build(context: BuildContext) -> Widget {
Row(
children: [
BlueBox(),
BlueBox(),
BlueBox(),
]
)
}
}
impl BlueBox {
fn build(context: BuildContext) -> Widget {
Container {
width: 50.0,
height: 50.0,
decoration: BoxDecoration(
color: ...,
border: ...
)
}
}
}
Row
has a horizontal main axis and Column
vertical main axis .
mainAxisSize
determines how much space Row
an Column
can occupy on their main axes.
MainAxis.max
MainAxis.min