flutter_tex
flutter_tex copied to clipboard
Space at the end of a TeXView widget in Flutter Web
Question: Are you using the latest version of flutter_tex package?
Answer: Yes
Question: If you are looking for a feature, have you watched the Demo Video and gone through the examples folder? Answer: Yes
Hello,
I am facing the issue, that after a TeXView(...) there is always an amount of space between the next widget (like in the picture I uploaded). Could you tell me, why there is that space? And how I could get rid of the space?
I am coding a flutter WEB App.
Thanks a lot for your help and kind regards!
Here a code snippet of the picture.
Card(
shadowColor: Color(0xFF8eacbb),
elevation: 6,
clipBehavior: Clip.antiAlias,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.blueGrey[600],
Colors.blueGrey[700]
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
), //BoxDecoration
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Rounded Card'),
const SizedBox(height: 4),
Text('Gradient'),
//Math.tex(r'\frac a b', mathStyle: MathStyle.text, textStyle: TextStyle(fontSize: 42)),
//Math.tex(r'\frac a b \textbf{ Hallo} \texttt{ Pieep } \textsf{\textbf{Hallo}}', mathStyle: MathStyle.text, textStyle: TextStyle(fontSize: 24)),
TeXView(
child: TeXViewColumn(children: [
TeXViewInkWell(
id: "id_0",
child: TeXViewColumn(children: [
TeXViewDocument(r"""<h2>Flutter \( \rm\\TeX \)</h2>""",
style: TeXViewStyle(textAlign: TeXViewTextAlign.Center)),
TeXViewContainer(
child: TeXViewImage.network(
'https://raw.githubusercontent.com/shah-xad/flutter_tex/master/example/assets/flutter_tex_banner.png'),
style: TeXViewStyle(
margin: TeXViewMargin.all(10),
borderRadius: TeXViewBorderRadius.all(20),
),
),
TeXViewDocument(r"""<p>
When \(a \ne 0 \), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$</p>""",
style: TeXViewStyle.fromCSS(
'padding: 15px; color: white; background: green'))
]),
)
]),
style: TeXViewStyle(
elevation: 10,
borderRadius: TeXViewBorderRadius.all(25),
border: TeXViewBorder.all(TeXViewBorderDecoration(
borderColor: Colors.blue,
borderStyle: TeXViewBorderStyle.Solid,
borderWidth: 5)),
backgroundColor: Colors.white,
),
),
Text('Where comes the space from?'),
], //children Card
), //Column
), //Container
), //Card
Hi!
I'm also having the same problem.
@shah-xad Would you have any news about this bug?
I just fixed it for myself #98, maybe it will help you too.