saminsohag

new line support added

## 0.0.4
* New line support added.
## 0.0.3
* Equation alignment fixed.
... ...
... ... @@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_math_fork/flutter_math.dart';
export 'package:flutter_math_fork/flutter_math.dart';
/// A Calculator.
/// A LaTex text view.
class TexText extends StatelessWidget {
const TexText(this.text,
{super.key,
... ... @@ -18,11 +18,16 @@ class TexText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.values[alignment.index % 3],
children: text.split('\n').map<Widget>(
(e) {
return Wrap(
alignment: alignment,
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 4,
children: text
children: e
.split("<m>")
.asMap()
.map<int, List<Widget>>(
... ... @@ -41,13 +46,12 @@ class TexText extends StatelessWidget {
}
return MapEntry(
index,
e
.split(" ")
.map<Widget>((e) => Text(
e.split(" ").map<Widget>((e) {
return Text(
e,
style: style,
))
.toList(),
);
}).toList(),
);
},
)
... ... @@ -56,5 +60,8 @@ class TexText extends StatelessWidget {
.expand<Widget>((element) => element)
.toList(),
);
},
).toList(),
);
}
}
... ...
name: tex_text
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.
version: 0.0.3
version: 0.0.4
homepage: https://github.com/saminsohag/flutter_packages/tree/main/tex_text
environment:
... ...