MaterialButton
一个实用程序类,用于依赖于环境[ButtonTheme]和[Theme]的建筑材料按钮。
const MaterialButton({
Key key,
@required this.onPressed, //点击按钮时的回调
this.onLongPress, //长按按钮时的回调
this.onHighlightChanged,
this.textTheme, //定义按钮的基本颜色
this.textColor, //button 文字颜色
this.disabledTextColor, //禁用按钮时此按钮文本的颜色
this.color,//按钮的填充颜色
this.disabledColor, //禁用按钮时的填充颜色
this.focusColor, //具有输入焦点时的填充颜色。
this.hoverColor, //指针悬停时的填充颜色。
this.highlightColor, //按钮[墨水池]的突出显示颜色。
this.splashColor, //按钮[墨水池]的闪色。
this.colorBrightness,
this.elevation, // 阴影的大小
this.focusElevation,//具有输入焦点时的阴影的大小
this.hoverElevation,//指针悬停时阴影的大小
this.highlightElevation,//按钮[墨水池]的突出显示颜色的阴影的大小
this.disabledElevation,//禁用按钮时的阴影的大小
this.padding, //间距
this.visualDensity,//按钮布局的紧凑程度。
this.shape,
this.clipBehavior = Clip.none,
this.focusNode,
this.autofocus = false,
this.materialTapTargetSize,
this.animationDuration,//定义[shape]和[elevation]动画更改的持续时间。
this.minWidth, // 最小宽度
this.height, //高度
this.enableFeedback = true, //检测到的手势是否应提供声音和/或触觉反馈。
this.child,
})
网友评论