FFTextButton constructor
FFTextButton({
- Key? key,
- String? text,
- int? maxLines,
- TextStyle? textStyle,
- double? fontSize,
- Color? fontColor,
- FontWeight? fontWeight = FontWeight.w400,
- double? fontLineHeight = 1.0,
- String? fontFamily,
- TextAlign? textAlign,
- String? notes,
- Function? onClick,
- bool? unconstrainedBox,
- AlignmentGeometry? alignment = Alignment.centerLeft,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- Color? color,
- Decoration? decoration,
- double? width,
- double? heigth,
Implementation
FFTextButton({
Key? key,
this.text,
this.maxLines,
this.textStyle,
this.fontSize,
this.fontColor,
this.fontWeight = FontWeight.w400,
this.fontLineHeight = 1.0,
this.fontFamily,
this.textAlign,
/**注释说明 */
String? notes,
/**点击事件 */
Function? onClick,
/**是否用 UnconstrainedBox包括,默认false
* 当设置为true,容器会自动撑到实际大小
* 设置为false,宽高优先来自自身的宽高值,其次是父级约束
*/
bool? unconstrainedBox,
/**对齐方式 */
AlignmentGeometry? alignment = Alignment.centerLeft,
/**外边框 */
EdgeInsetsGeometry? margin,
/**内边框 */
EdgeInsetsGeometry? padding,
/**背景颜色 */
Color? color,
/**
* 装饰
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.red,
border: Border.all(width: 1.w,color: Colors.yellow),
image: DecorationImage(
image: NetworkImage("https://avatar.csdn.net/8/9/A/3_chenlove1.jpg"),
fit: BoxFit.fill,
),
)
* */
Decoration? decoration,
/**宽 */
double? width,
/**高 */
double? heigth,
/**隐藏组件,但保留位置,默认值为false */
bool? hiddenKeepFrame,
/**隐藏组件,并清除位置,默认值为false,优先级低于hiddenKeepFrame */
bool? hiddenClearFrame,
}) : super(
key: key,
notes: notes,
onClick: onClick,
alignment: alignment,
margin: margin,
padding: padding,
color: color,
decoration: decoration,
width: width,
heigth: heigth,
unconstrainedBox: unconstrainedBox,
hiddenKeepFrame: hiddenKeepFrame,
hiddenClearFrame: hiddenClearFrame,
);