saminsohag

heading textstyles fixed

## 0.0.2
* Documentation improved and heading styles fixed.
## 0.0.1
* Limited markdown support and latex formula support.
... ...
... ... @@ -31,7 +31,18 @@ class MyHomePage extends StatefulWidget {
}
class _MyHomePageState extends State<MyHomePage> {
final TextEditingController _controller = TextEditingController();
final TextEditingController _controller =
TextEditingController(text: '''# hi how are you?
## hi how are you?
### hi how are you?
#### hi how are you?
##### hi how are you?
###### hi how are you?''');
@override
Widget build(BuildContext context) {
return Scaffold(
... ...
... ... @@ -204,7 +204,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "0.0.2"
tex_text:
dependency: transitive
description:
... ...
import 'package:flutter/material.dart';
import 'package:tex_text/tex_text.dart';
/// It creates a markdown widget closed to each other.
class MdWidget extends StatelessWidget {
MdWidget(String expression,
{super.key, this.style, this.onLinkTab, this.followLinkColor = false})
... ... @@ -52,7 +53,6 @@ class MdWidget extends StatelessWidget {
child: MdWidget(
e[index] ?? "",
style: style,
// alignment: TexAlignment.center,
),
),
),
... ... @@ -67,12 +67,15 @@ class MdWidget extends StatelessWidget {
return TexText(
"${match?[2]}",
style: [
Theme.of(context).textTheme.headline1?.copyWith(color: style?.color),
Theme.of(context).textTheme.headline2?.copyWith(color: style?.color),
Theme.of(context).textTheme.headline3?.copyWith(color: style?.color),
Theme.of(context).textTheme.headline4?.copyWith(color: style?.color),
Theme.of(context).textTheme.headline5?.copyWith(color: style?.color),
Theme.of(context).textTheme.headline6?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleMedium
?.copyWith(color: style?.color),
Theme.of(context).textTheme.titleSmall?.copyWith(color: style?.color),
Theme.of(context).textTheme.bodySmall?.copyWith(color: style?.color),
][match![1]!.length - 1],
);
}
... ... @@ -94,10 +97,6 @@ class MdWidget extends StatelessWidget {
"${match?[1]}",
style: style,
),
// TexText(
// "${match?[1]}",
// style: style,
// ),
],
);
}
... ...
... ... @@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'md_widget.dart';
/// A Calculator.
/// This widget create a full markdown widget as a column view.
class TexMarkdown extends StatelessWidget {
const TexMarkdown(
this.data, {
... ...
name: tex_markdown
description: This package is used to create flutter widget that can render markdown and latex formulas. It is very simple to use and uses native flutter components.
version: 0.0.1
version: 0.0.2
homepage: https://github.com/saminsohag/flutter_packages/tree/main/tex_markdown
environment:
... ...