toRow method
Widget
toRow({
- Key? key,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- MainAxisSize mainAxisSize = MainAxisSize.max,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- TextDirection? textDirection,
- VerticalDirection verticalDirection = VerticalDirection.down,
- TextBaseline? textBaseline,
- Widget? separator,
- bool removeLast = true,
转 Row
Implementation
Widget toRow({
Key? key,
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
MainAxisSize mainAxisSize = MainAxisSize.max,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
TextDirection? textDirection,
VerticalDirection verticalDirection = VerticalDirection.down,
TextBaseline? textBaseline,
Widget? separator,
bool removeLast = true,
}) =>
Row(
key: key,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
textDirection: textDirection,
verticalDirection: verticalDirection,
textBaseline: textBaseline,
children: separator != null && length > 0
? (removeLast
? (expand((child) => [child, separator]).toList()..removeLast())
: (expand((child) => [child, separator]).toList()))
: this,
);