zoukankan      html  css  js  c++  java
  • Row

    代码:

    new Row(
    children: <Widget>[
    new RaisedButton(
    onPressed: (){},
    color: Colors.red,
    child: new Text('红色按钮'),
    ),
    Expanded(child: new RaisedButton(
    onPressed: (){},
    color: Colors.green,
    child: new Text('绿色按钮'),
    ),),
    new RaisedButton(
    onPressed: (){},
    color: Colors.blue,
    child: new Text('蓝色按钮'),
    )
    总结:

    //横向布局

    Row(

    children:<widget>{

    //不灵活布局

    new ReisedButton(

    onPressed:(){}//不处理

    color ://颜色

    child:new Text(‘’)按钮文字

     

    ),

     

    //灵活布局

     

    Expanded(child: new RaisedButton(

    同上

     

    ),),

    如果两边不灵活布局 中间一个灵活,那就会不灵活布局是根据内容大小展示,灵活的自动撑满一行

     

    }




    ],
    ),
     
  • 相关阅读:
    closure
    运算符优先级
    css妙用
    BFC (块级格式化上下文)
    display:table-cell 详解
    line-height深入理解
    margin collapse
    探究 CSS 解析原理
    python入门
    spring与线程安全
  • 原文地址:https://www.cnblogs.com/pp-pping/p/12162526.html
Copyright © 2011-2022 走看看