|
@@ -20,6 +20,9 @@ class FTitleField extends StatelessWidget implements FWidget {
|
|
|
//标题最小宽度(为了水平能够对齐)
|
|
|
late double minTitleWidth;
|
|
|
|
|
|
+ ///是否加粗标题
|
|
|
+ late bool isBold;
|
|
|
+
|
|
|
///是否是必填项
|
|
|
late bool isRequiredField;
|
|
|
FTitleField(
|
|
@@ -30,6 +33,7 @@ class FTitleField extends StatelessWidget implements FWidget {
|
|
|
this.sizeAfter = 10,
|
|
|
this.maxLargeFieldWidth = 210,
|
|
|
this.minTitleWidth = 60,
|
|
|
+ this.isBold = true,
|
|
|
this.isRequiredField = false,
|
|
|
}) : super(key: key);
|
|
|
@override
|
|
@@ -67,7 +71,7 @@ class FTitleField extends StatelessWidget implements FWidget {
|
|
|
TextSpan(children: [
|
|
|
TextSpan(
|
|
|
text: title,
|
|
|
- style: TextStyle(fontWeight: FontWeight.bold),
|
|
|
+ style: isBold ? TextStyle(fontWeight: FontWeight.bold) : null,
|
|
|
),
|
|
|
if (isRequiredField) ...[
|
|
|
TextSpan(
|