zoukankan      html  css  js  c++  java
  • flutter table使用方法

    /**
     * 表格
     * 表格的每一行的高度,由其内容决定,每一列的宽度,则由columnWidths控制
        Table({
        Key key,
        this.children = const <TableRow>[],//
        this.columnWidths,//设置每一列的宽度。
        this.defaultColumnWidth = const FlexColumnWidth(1.0),//默认的每一列宽度值,默认情况下均分
        this.textDirection,//文字方向,一般无需考虑。
        this.border,//表格边框。
        this.defaultVerticalAlignment = TableCellVerticalAlignment.top,//每一个cell的垂直方向的alignment。 top:被放置在的顶部; middle:垂直居中; bottom:放置在底部;  baseline:文本baseline对齐; fill:充满整个cell。
        this.textBaseline,//defaultVerticalAlignment为baseline的时候,会用到这个属性。
        })
     */ 


    Table(
    columnWidths: <int, TableColumnWidth>{
    0: FixedColumnWidth(Screen.width(300)),
    1: FixedColumnWidth(Screen.width(300))
    },
    defaultVerticalAlignment: TableCellVerticalAlignment.middle,
    border: TableBorder.all(
    color: Colors.grey,
    Screen.width(2)
    ),
    children: [
    TableRow(
    decoration: BoxDecoration(
    color: ColorGather.colorBg()
    ),
    children: [
    Container(
    alignment: Alignment.center,
    height: Screen.width(80),
    child: Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)),),
    ),
    Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)), textAlign: TextAlign.center,)
    ]
    ),
    TableRow(
    children: [
    Container(
    alignment: Alignment.center,
    height: Screen.width(80),
    child: Text('黄铜', style: TextStyle(fontSize: Screen.width(28)),),
    ),
    Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)), textAlign: TextAlign.center,)
    ]
    ),
    ],
    )
  • 相关阅读:
    初探Remoting双向通信(三)
    MySQL主从复制
    MySQL锁机制
    mySql索引
    连接池
    JDBC
    数据库建表、约束、索引
    Oracle和SQL简介
    Stream API 和 注解
    lambda表达式
  • 原文地址:https://www.cnblogs.com/zhaofeis/p/12567148.html
Copyright © 2011-2022 走看看