Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
gpt_markdown
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
saminsohag
2022-12-20 13:15:13 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
80c285fe2c0bc0f030eda76f5308113bf7d89abc
80c285fe
1 parent
19259c2d
heading textstyles fixed
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
12 deletions
tex_markdown/CHANGELOG.md
tex_markdown/example/lib/main.dart
tex_markdown/example/pubspec.lock
tex_markdown/lib/md_widget.dart
tex_markdown/lib/tex_markdown.dart
tex_markdown/pubspec.yaml
tex_markdown/CHANGELOG.md
View file @
80c285f
## 0.0.2
*
Documentation improved and heading styles fixed.
## 0.0.1
*
Limited markdown support and latex formula support.
...
...
tex_markdown/example/lib/main.dart
View file @
80c285f
...
...
@@ -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
(
...
...
tex_markdown/example/pubspec.lock
View file @
80c285f
...
...
@@ -204,7 +204,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.
1
"
version: "0.0.
2
"
tex_text:
dependency: transitive
description:
...
...
tex_markdown/lib/md_widget.dart
View file @
80c285f
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,
// ),
],
);
}
...
...
tex_markdown/lib/tex_markdown.dart
View file @
80c285f
...
...
@@ -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
,
{
...
...
tex_markdown/pubspec.yaml
View file @
80c285f
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
:
...
...
Please
register
or
login
to post a comment