CenterText constructor
Display a text at the center of a widget.
The font color is in gray, that no matter light mode (background white) or dark mode (background black), the text is likely to be visible.
- It's usually only used for debug propose or a placeholder as child.
- There's wrapper to ensure the inherit requirement of the text.
- Don't use for production if you want to improve performance.
Implementation
const CenterText(this.text, {super.key});