ClickButton class

create_user: zhengzaihong email:1096877329@qq.com create_date: 2022/6/1 create_time: 9:40 describe: 封装一个功能按钮组件 背景切换 功能组件 顶层需要FunctionContainer包装 支持 上下左右 添加其他元素的组件

Inheritance
Available Extensions

Constructors

ClickButton({required String title, required int index, TextStyle checkedTextStyle = const TextStyle(color: Colors.white, fontSize: 20), TextStyle unCheckTextStyle = const TextStyle(color: Colors.black38, fontSize: 20), BoxDecoration checkedBoxDecoration = const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(10))), BoxDecoration unCheckedBoxDecoration = const BoxDecoration(color: Colors.black38, borderRadius: BorderRadius.all(Radius.circular(10))), double width = 20, double height = 20, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, double? textScaleFactor, int? maxLines, String? semanticsLabel, EdgeInsetsGeometry padding = const EdgeInsets.all(0), EdgeInsetsGeometry margin = const EdgeInsets.all(0), Color highlightColor = Colors.transparent, Color hoverColor = Colors.transparent, Color? focusColor, Color? splashColor, double? radius, AlignmentGeometry alignment = Alignment.center, double drawPadding = 5.0, PositionEnum drawablePosition = PositionEnum.drawableRight, Widget? drawableWidget, Widget? drawablePressWidget, bool enableClick = true, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, MainAxisSize mainAxisSize = MainAxisSize.min, Key? key})
const

Properties

alignment AlignmentGeometry
final
checkedBoxDecoration BoxDecoration
final
checkedTextStyle TextStyle
final
crossAxisAlignment CrossAxisAlignment
final
drawablePosition PositionEnum
图标显示位置
final
drawablePressWidget Widget?
final
drawableWidget Widget?
通常设置的图标 (选中和未选中支持)
final
drawPadding double
final
enableClick bool
是否可点击
final
focusColor Color?
final
hashCode int
The hash code for this object.
no setterinherited
height double
final
highlightColor Color
final
hoverColor Color
final
index int
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
final
mainAxisAlignment MainAxisAlignment
final
mainAxisSize MainAxisSize
final
margin EdgeInsetsGeometry
final
maxLines int?
final
overflow TextOverflow?
final
padding EdgeInsetsGeometry
final
radius double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
final
softWrap bool?
final
splashColor Color?
final
strutStyle StrutStyle?
final
textAlign TextAlign?
final
textDirection TextDirection?
final
textScaleFactor double?
final
title String
final
unCheckedBoxDecoration BoxDecoration
final
unCheckTextStyle TextStyle
final
width double
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _ClickButtonState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited