mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: add hint text for math equation plugin
This commit is contained in:
parent
2b27fe85aa
commit
89becbfe71
@ -113,17 +113,25 @@ class _MathEquationNodeWidgetState extends State<_MathEquationNodeWidget> {
|
|||||||
Widget _buildMathEquation(BuildContext context) {
|
Widget _buildMathEquation(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
constraints: const BoxConstraints(minHeight: 50),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||||
color: _isHover ? Colors.grey[200] : Colors.transparent,
|
color: _isHover || _mathEquation.isEmpty
|
||||||
|
? Colors.grey[200]
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Math.tex(
|
child: _mathEquation.isEmpty
|
||||||
_mathEquation,
|
? Text(
|
||||||
textStyle: const TextStyle(fontSize: 20),
|
'Add a Math Equation',
|
||||||
mathStyle: MathStyle.display,
|
style: widget.editorState.editorStyle.placeholderTextStyle,
|
||||||
),
|
)
|
||||||
|
: Math.tex(
|
||||||
|
_mathEquation,
|
||||||
|
textStyle: const TextStyle(fontSize: 20),
|
||||||
|
mathStyle: MathStyle.display,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user