美文网首页
flutter Row

flutter Row

作者: 学学学q | 来源:发表于2019-12-30 19:59 被阅读0次
  • Row的基本属性

    children:传入子组件的数组
    mainAxisAlignment: 子组件在水平方向上的对齐方式
    crossAxisAlignment:子组件在纵轴方向上的对齐方式
    textDirection:布局顺序,一般情况从左到右
    mainAxisSize:max,表示尽可能多的占用水平方向上的位置,min则反之
    
MainAxisAlignment.spaceEvenly MainAxisAlignment.spaceAround MainAxisAlignment.spaceBetween
  • 例子
 Row(
        mainAxisAlignment: MainAxisAlignment.center,
        textDirection: TextDirection.rtl,
        children: <Widget>[
          Container(
            width: 100,
            height: 100,
            color: Colors.red,
            alignment: Alignment.center,
            child: Text("A", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
          Container(
            width: 100,
            height: 100,
            color: Colors.yellow,
            alignment: Alignment.center,
            child: Text("B", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
          Container(
            width: 100,
            height: 100,
            color: Colors.green,
            alignment: Alignment.center,
            child: Text("C", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
        ],
      ),

相关文章

  • flutter布局-2-row

    Row 连载:flutter布局-1-column 1、mainAxisAlignment:主轴布局方式,row主...

  • Flutter 基础布局 Row Widget

    Flutter 基础布局 Row Widget Row Widget类似于Andorid中的LinearLayou...

  • flutter Row

    Row的基本属性children:传入子组件的数组mainAxisAlignment: 子组件在水平方向上的对齐方...

  • Flutter-Row的使用说明

    Flutter-Row的使用说明 Row的定义 Row和Container,Column,Stash基本上一样,都...

  • Flutter UI - Row、Column / 一行、一列

    Row、Column 是 Flutter 中最常用的这布局 Weight 了。Row = 一行、Column = ...

  • flutter布局-4-container

    Container 容器 连载:flutter布局-1-column连载:flutter布局-2-row连载:fl...

  • 第五节 FlutterROW 水平布局

    Flutter中的row控件就是水平控件,它可以让Row里边的子元素进行水平排列。 Row控件可以分为灵活排列和非...

  • 06. 水平布局Row的使用

    Flutter中的row控件就是水平控件,它可以让Row里边的子元素进行水平排列。 Row控件可以分为灵活排列和非...

  • Flutter中Flex布局介绍

    在Flutter中,Row组件和Column组件都继承自Flex组件(1).Flex组件和Row、Column属性...

  • Flutter-8-水平布局Row

    flutter中的row控件就是水平控件,它可以让Row里边的子元素进行水平排列。Row控件可以分为灵活排列和非灵...

网友评论

      本文标题:flutter Row

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