Showing
3 changed files
with
12 additions
and
3 deletions
@@ -7,15 +7,20 @@ export 'package:flutter_math_fork/flutter_math.dart'; | @@ -7,15 +7,20 @@ export 'package:flutter_math_fork/flutter_math.dart'; | ||
7 | /// A Calculator. | 7 | /// A Calculator. |
8 | class TexText extends StatelessWidget { | 8 | class TexText extends StatelessWidget { |
9 | const TexText(this.text, | 9 | const TexText(this.text, |
10 | - {super.key, this.style, this.mathStyle = MathStyle.display}); | 10 | + {super.key, |
11 | + this.style, | ||
12 | + this.mathStyle = MathStyle.display, | ||
13 | + this.alignment = WrapAlignment.start}); | ||
11 | final String text; | 14 | final String text; |
12 | final TextStyle? style; | 15 | final TextStyle? style; |
13 | final MathStyle mathStyle; | 16 | final MathStyle mathStyle; |
17 | + final WrapAlignment alignment; | ||
14 | 18 | ||
15 | @override | 19 | @override |
16 | Widget build(BuildContext context) { | 20 | Widget build(BuildContext context) { |
17 | return Wrap( | 21 | return Wrap( |
18 | - alignment: WrapAlignment.start, | 22 | + alignment: alignment, |
23 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
19 | spacing: 4, | 24 | spacing: 4, |
20 | children: text | 25 | children: text |
21 | .split("<m>") | 26 | .split("<m>") |
1 | name: tex_text | 1 | name: tex_text |
2 | description: This package for Flutter allows you to show text on a Flutter app with LaTex math formula and normal text from string. It is vary easy to use and works for all of the platforms. | 2 | description: This package for Flutter allows you to show text on a Flutter app with LaTex math formula and normal text from string. It is vary easy to use and works for all of the platforms. |
3 | -version: 0.0.2 | 3 | +version: 0.0.3 |
4 | homepage: https://github.com/saminsohag/flutter_packages/tree/main/tex_text | 4 | homepage: https://github.com/saminsohag/flutter_packages/tree/main/tex_text |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment