toRow method

Widget toRow({
  1. Key? key,
  2. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  3. MainAxisSize mainAxisSize = MainAxisSize.max,
  4. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  5. TextDirection? textDirection,
  6. VerticalDirection verticalDirection = VerticalDirection.down,
  7. TextBaseline? textBaseline,
  8. Widget? separator,
  9. 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,
    );