buildHeaderBoldWithHash function
Widget
buildHeaderBoldWithHash(
- bool isMandatory = false,
})
Implementation
Widget buildHeaderBoldWithHash(BuildContext context, String name,
{int? maxLines,
bool? softWrap,
Color? textColor,
bool isMandatory = false}) {
return Container(
constraints: const BoxConstraints(
minWidth: 250.0,
maxWidth: 250.0,
),
child: RichText(
textAlign: TextAlign.left,
text: TextSpan(
text: name,
style: TextStyles.normalBold(context, textColor: textColor),
children: isMandatory
? [
const TextSpan(
text: ' *',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
),
),
]
: [],
),
maxLines: maxLines,
softWrap: softWrap ?? false,
overflow: TextOverflow.ellipsis,
),
);
}