Wrap

作者: 不二客 | 来源:发表于2020-08-07 11:14 被阅读0次

    Wrap

     Wrap({
        Key key,
        this.direction = Axis.horizontal,//两个维度上的两个基本方向。
        this.alignment = WrapAlignment.start, //子控件在主轴上的对齐方式
        this.spacing = 0.0,  //主轴上子控件中间的间距
        this.runAlignment = WrapAlignment.start, // 子控件在交叉轴上的对齐方式
        this.runSpacing = 0.0, // 交叉轴上子控件之间的间距
        this.crossAxisAlignment = WrapCrossAlignment.start, //交叉轴上子控件的对齐方式
        this.textDirection,
        this.verticalDirection = VerticalDirection.down,
        List<Widget> children = const <Widget>[],
      }) 
    

    WrapAlignment

    start 将子控件放在主轴的开始位置
    end 将子控件放在主轴的结束位置
    center 将子控件放在主轴的中间位置
    spaceBetween 空白区域均分 首尾child都靠近首尾
    spaceAround 空白区域均分 首尾child的空白区域为1/2
    spaceEvenly 空白区域均分 包括首尾

    WrapCrossAlignment

    start 将子控件放在交叉轴的起始位置
    end 将子控件放在交叉轴的结束位置
    center 将子控件放在交叉轴的中间位置

    相关文章

      网友评论

          本文标题:Wrap

          本文链接:https://www.haomeiwen.com/subject/sdtqrktx.html