博客
关于我
Flutter开发之——Tooltip
阅读量:100 次
发布时间:2019-02-26

本文共 909 字,大约阅读时间需要 3 分钟。

一 概述

  • Tooltip是一个消息提示组件
  • 当用户点击或者长按时显示提示,在屏幕阅读器能够使它语音化,这有助于示例障碍人士阅读

二 Tooltip

2.1 构造函数

const Tooltip({    Key? key,    required this.message,    this.height,    this.padding,    this.margin,    this.verticalOffset,    this.preferBelow,    this.excludeFromSemantics,    this.decoration,    this.textStyle,    this.waitDuration,    this.showDuration,    this.child,  })

2.2 常用属性说明

属性 说明 取值
message 长按时展示文本内容 String
child 子控件 Widget
height 展现消息的高度 double
textStyle 展现消息的样式 TextStyle
waitDuration 等待时长 Duration
showDuration 展示时长 Duration

三 示例

3.1 代码

Tooltip(        message: '打印',        verticalOffset: 2,        waitDuration: Duration(seconds: 5),        showDuration: Duration(seconds: 2),        padding: EdgeInsets.all(2.0),        margin: EdgeInsets.all(5.0),        textStyle: TextStyle(color: Colors.blue),        decoration: BoxDecoration(color: Colors.red),        child: Icon(Icons.print),        )

3.2 效果图

转载地址:http://lfsk.baihongyu.com/

你可能感兴趣的文章
MSB与LSB
查看>>
MSCRM调用外部JS文件
查看>>
MSCRM调用外部JS文件
查看>>
MSEdgeDriver (Chromium) 不适用于版本 >= 79.0.313 (Canary)
查看>>
MsEdgeTTS开源项目使用教程
查看>>
msf
查看>>
MSSQL数据库查询优化(一)
查看>>
MSSQL日期格式转换函数(使用CONVERT)
查看>>
MSTP多生成树协议(第二课)
查看>>
MSTP是什么?有哪些专有名词?
查看>>
Mstsc 远程桌面链接 And 网络映射
查看>>
Myeclipse常用快捷键
查看>>
MyEclipse用(JDBC)连接SQL出现的问题~
查看>>
myeclipse的新建severlet不见解决方法
查看>>
MyEclipse设置当前行背景颜色、选中单词前景色、背景色
查看>>
myeclipse配置springmvc教程
查看>>
MyEclipse配置SVN
查看>>
MTCNN 人脸检测
查看>>
MyEcplise中SpringBoot怎样定制启动banner?
查看>>
MyPython
查看>>