build method
Implementation
@override
Widget build(BuildContext context) {
TextStyle? style = switch (tipStyle) {
TipStyle.error => textStyle.bodySmall?.merge(const TextStyle(color: Colors.red)),
TipStyle.success => textStyle.bodySmall?.merge(const TextStyle(color: Colors.green)),
TipStyle.hidden => textStyle.bodySmall?.merge(const TextStyle(color: Colors.transparent)),
_ => textStyle.bodySmall,
};
return Text(text, textAlign: textAlign, style: style, overflow: TextOverflow.clip);
}