4.2 弹性布局 - Flex

2023-09-17  本文已影响0人  努力生活的西鱼
  Flex({
    super.key,
    required this.direction, // 弹性布局的方向
    this.mainAxisAlignment = MainAxisAlignment.start, // 主轴的对齐方式
    this.mainAxisSize = MainAxisSize.max,
    this.crossAxisAlignment = CrossAxisAlignment.center,
    this.textDirection,
    this.verticalDirection = VerticalDirection.down,
    this.textBaseline, // NO DEFAULT: we don't know what the text's baseline should be
    this.clipBehavior = Clip.none,
    super.children,
  })
    Expanded({
      super.key,
      super.flex, // 弹性系数,0或null,没有弹性
      required super.child,
    })
上一篇 下一篇

猜你喜欢

热点阅读