keyOrValueTitleText method
Widget
keyOrValueTitleText(
- bool isKey,
- String text, {
- bool isValueAlign = true,
- bool isArrow = false,
- required PairInfoTableConfig themeData,
Implementation
Widget keyOrValueTitleText(bool isKey, String text,
{bool isValueAlign = true,
bool isArrow = false,
required PairInfoTableConfig themeData}) {
bool isSingle;
if (isArrow) {
isSingle = true;
} else {
isSingle = !isValueAlign;
}
String show;
if (text.isEmpty) {
if (isKey) {
show = '--:';
} else {
show = '--';
}
} else {
show = text;
}
Widget keyOrValue = Text(
show,
overflow: isSingle ? TextOverflow.ellipsis : TextOverflow.clip,
maxLines: isSingle ? 1 : null,
style: isKey
? themeData.keyTextStyle.generateTextStyle()
: themeData.valueTextStyle.generateTextStyle(),
);
return keyOrValue;
}