0
点赞
收藏
分享

微信扫一扫

Flutter 组件(ListTile)参数中文说明

修炼之士 2022-04-25 阅读 72
flutter
const ListTile({
    Key key,
    this.leading, //左侧的组件
    this.title, //中间的主标题
    this.subtitle, //中间的副标题
    this.trailing, //右侧组件,通常是一个值或者一个图标
    this.isThreeLine = false, //是否显示三行
    this.dense, //是否以垂直密集的方式显示,这样文字会更小
    this.visualDensity,
    this.shape, //定义外观形状
    this.contentPadding, //内容与边框之间的边距,默认16
    this.enabled = true, //是否可以互动事件
    this.onTap, //点击事件
    this.onLongPress, //长按事件
    this.mouseCursor, //鼠标悬停在ListTile上时的处理效果,给web用的
    this.selected = false, //如果是true,文本和图标将会以相同的颜色呈现
    this.focusColor, 
    this.hoverColor, //指针悬停在ListTile上的颜色
    this.focusNode, //聚焦事件
    this.autofocus = false, //是否默认聚焦
    this.tileColor, //listTile的背景颜色,selected=false时生效
    this.selectedTileColor, //listTile的背景颜色,selected=true时生效
  })
举报

相关推荐

0 条评论