Indent constructor
- Key? key,
- required EdgeInsetsGeometry padding,
- required List<
Widget> children, - CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- MainAxisSize mainAxisSize = MainAxisSize.min,
- VerticalDirection verticalDirection = VerticalDirection.down,
A widget for setting padding between elements in a Column or ListView.
As is, multiple elements can be included with children
, which improves the overall look.
You can set the padding with padding
.
You can set how to place the child elements along the cross axis with crossAxisAlignment
.
You can set how to place the child elements along the main axis with mainAxisAlignment
.
You can set how much space to take along the main axis with mainAxisSize
.
You can set the direction along the main axis to use with verticalDirection
.
ColumnやListViewの中で、要素の間にパディングを設定するためのウィジェット。
そのまま、children
で複数の要素を含めることができるので、全体的な見栄えがよくなります。
padding
でパディングを設定できます。
crossAxisAlignment
で、子要素をクロス軸方向にどのように配置するかを設定できます。
mainAxisAlignment
で、子要素をメイン軸方向にどのように配置するかを設定できます。
mainAxisSize
で、メイン軸方向にどれだけのスペースを取るかを設定できます。
verticalDirection
で、メイン軸方向として使用する方向を設定できます。
Implementation
const Indent({
super.key,
required this.padding,
required this.children,
this.crossAxisAlignment = CrossAxisAlignment.start,
this.mainAxisAlignment = MainAxisAlignment.start,
this.mainAxisSize = MainAxisSize.min,
this.verticalDirection = VerticalDirection.down,
});