Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
833 B
2
Indexable
Never
static Widget buildTextWithOverflowTooltip(
      String fieldText, TextStyle textStyle) {
    return AutoSizeText(
      fieldText,
      maxLines: 1,
      maxFontSize: textStyle.fontSize!,
      minFontSize: textStyle.fontSize!,
      style: textStyle,
      overflowReplacement: Tooltip(
        decoration: BoxDecoration(
          color: const Color.fromRGBO(20, 20, 20, 1),
          border: Border.all(
            color: const Color.fromRGBO(53, 53, 53, 1),
          ),
          borderRadius: const BorderRadius.all(
            Radius.circular(4),
          ),
        ),
        textStyle: SharedStyles.defaultWhiteText,
        verticalOffset: 10,
        message: fieldText,
        child: Text(
          fieldText,
          overflow: TextOverflow.ellipsis,
          style: textStyle,
        ),
      ),
    );
  }