JuiTag constructor
const
JuiTag({
- Key? key,
- required String text,
- double paddingVertical = 2,
- double paddingHorizontal = 10,
- JuiTagType tagType = JuiTagType.text,
- JuiTagShapeType tagShapeType = JuiTagShapeType.rectangle,
- JuiTagColorType tagColorType = JuiTagColorType.blue,
- Widget? icon,
- double fontSize = 12,
- Alignment alignment = Alignment.center,
创建一个 JuiTag 组件
text:标签显示的文本内容(必填)。paddingVertical:垂直内边距,默认为2。paddingHorizontal:水平内边距,默认为10。tagType:标签类型(文本或带图标),默认为JuiTagType.text。tagShapeType:标签形状,默认为JuiTagShapeType.rectangle。tagColorType:标签颜色,默认为JuiTagColorType.blue。icon:可选的左侧图标,仅在tagType.icon下有效。fontSize:文本字体大小,默认为12。alignment:文本对齐方式,默认为Alignment.center。
Implementation
const JuiTag({
Key? key,
required this.text,
this.paddingVertical = 2,
this.paddingHorizontal = 10,
this.tagType = JuiTagType.text,
this.tagShapeType = JuiTagShapeType.rectangle,
this.tagColorType = JuiTagColorType.blue,
this.icon,
this.fontSize = 12,
this.alignment = Alignment.center,
}) : super(key: key);