saminsohag

wrapping and table border color fixed

## 0.0.4
* Heading, Lists, Checkboxes and RadioButton wrap fixed and Table borer color fixed.
## 0.0.3
* More support added and heading text style changed.
... ...
... ... @@ -7,24 +7,46 @@ void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
ThemeMode _themeMode = ThemeMode.light;
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
themeMode: _themeMode,
theme: ThemeData(
useMaterial3: true,
brightness: Brightness.light,
colorSchemeSeed: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
darkTheme: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: Colors.blue,
),
home: MyHomePage(
title: 'Flutter Demo Home Page',
onPressed: () {
setState(() {
_themeMode = ThemeMode.values[(_themeMode.index + 1) % 2];
});
},
),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
const MyHomePage({super.key, required this.title, required this.onPressed});
final VoidCallback? onPressed;
final String title;
... ... @@ -61,6 +83,12 @@ class _MyHomePageState extends State<MyHomePage> {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
actions: [
IconButton(
onPressed: widget.onPressed,
icon: const Icon(Icons.sunny),
),
],
),
body: Column(
children: [
... ...
... ... @@ -204,7 +204,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.3"
version: "0.0.4"
tex_text:
dependency: transitive
description:
... ...
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:tex_text/tex_text.dart';
... ... @@ -47,7 +49,10 @@ class MdWidget extends StatelessWidget {
}
return Table(
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
border: TableBorder.all(width: 1),
border: TableBorder.all(
width: 1,
color: Theme.of(context).colorScheme.onSurface,
),
children: value
.map<TableRow>(
(e) => TableRow(
... ... @@ -72,34 +77,36 @@ class MdWidget extends StatelessWidget {
children: [
Row(
children: [
TexText(
"${match?[2]}",
style: [
Theme.of(context)
.textTheme
.headlineLarge
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.headlineMedium
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.headlineSmall
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleLarge
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleMedium
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleSmall
?.copyWith(color: style?.color),
][match![1]!.length - 1],
Expanded(
child: TexText(
"${match?[2]}",
style: [
Theme.of(context)
.textTheme
.headlineLarge
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.headlineMedium
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.headlineSmall
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleLarge
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleMedium
?.copyWith(color: style?.color),
Theme.of(context)
.textTheme
.titleSmall
?.copyWith(color: style?.color),
][match![1]!.length - 1],
),
),
],
),
... ... @@ -127,10 +134,12 @@ class MdWidget extends StatelessWidget {
fillColor: ButtonStyleButton.allOrNull(style?.color),
),
),
MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
Expanded(
child: MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
),
),
],
);
... ... @@ -150,10 +159,12 @@ class MdWidget extends StatelessWidget {
fillColor: ButtonStyleButton.allOrNull(style?.color),
),
),
MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
Expanded(
child: MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
),
),
],
);
... ... @@ -172,10 +183,12 @@ class MdWidget extends StatelessWidget {
size: 8,
),
),
MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
Expanded(
child: MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
),
),
],
);
... ... @@ -194,10 +207,12 @@ class MdWidget extends StatelessWidget {
.copyWith(fontWeight: FontWeight.bold),
),
),
MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
Expanded(
child: MdWidget(
"${match?[2]}",
onLinkTab: onLinkTab,
style: style,
),
),
],
);
... ... @@ -228,7 +243,7 @@ class MdWidget extends StatelessWidget {
if (onLinkTab == null) {
return;
}
onLinkTab!("${match?[1]}", "${match?[2]}");
onLinkTab!("${match?[2]}", "${match?[1]}");
},
child: MdWidget(
"${match?[1]}",
... ...
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.3
version: 0.0.4
homepage: https://github.com/saminsohag/flutter_packages/tree/main/tex_markdown
environment:
... ...