File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -280,18 +280,22 @@ class MathElement extends ReplacedElement {
280
280
if (element.localName == "math" ) {
281
281
texStr = parseMathRecursive (element, r'' );
282
282
}
283
- return Container (
284
- width: MediaQuery .of (context.buildContext).size.width,
285
- child: Math .tex (
286
- texStr,
287
- onErrorFallback: (FlutterMathException e) {
288
- if (context.parser.onMathError != null ) {
289
- return context.parser.onMathError! .call (texStr, e.message, e.messageWithType);
290
- } else {
291
- return Text (e.message);
292
- }
293
- },
294
- )
283
+ return Padding (
284
+ padding: const EdgeInsets .only (bottom: 3.5 ),
285
+ child: Container (
286
+ width: element.localName == "math" ?
287
+ MediaQuery .of (context.buildContext).size.width : null ,
288
+ child: Math .tex (
289
+ texStr,
290
+ onErrorFallback: (FlutterMathException e) {
291
+ if (context.parser.onMathError != null ) {
292
+ return context.parser.onMathError! .call (texStr, e.message, e.messageWithType);
293
+ } else {
294
+ return Text (e.message);
295
+ }
296
+ },
297
+ )
298
+ ),
295
299
);
296
300
}
297
301
You can’t perform that action at this time.
0 commit comments