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
2024-02-17 12:20:47 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e900edded788e5b4162e0c2aebe0679969e85261
e900edde
1 parent
b4b83547
16081_16081 syntex fixed
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
24 deletions
gpt_markdown/CHANGELOG.md
gpt_markdown/example/lib/main.dart
gpt_markdown/example/pubspec.lock
gpt_markdown/lib/gpt_markdown.dart
gpt_markdown/pubspec.yaml
gpt_markdown/CHANGELOG.md
View file @
e900edd
## 0.0.10
*
$$_$$ syntex fixes.
## 0.0.9
*
$_$ syntex added for latex with a gard condition for
\(
_
\)
.
...
...
gpt_markdown/example/lib/main.dart
View file @
e900edd
import
'dart:developer'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_math_fork/flutter_math.dart'
;
import
'package:gpt_markdown/gpt_markdown.dart'
;
import
'package:flutter_math_fork/flutter_math.dart'
;
//
void
main
(
)
{
runApp
(
const
MyApp
());
}
...
...
@@ -46,6 +46,7 @@ class _MyAppState extends State<MyApp> {
}
}
//
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
super
.
key
,
required
this
.
title
,
required
this
.
onPressed
});
final
VoidCallback
?
onPressed
;
...
...
@@ -136,29 +137,27 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex
),
child: LayoutBuilder(builder: (context, constraints) {
return Theme(
data: Theme.of(context).copyWith(
textTheme: const TextTheme(
// For H1.
headlineLarge: TextStyle(fontSize: 55),
// For H2.
headlineMedium: TextStyle(fontSize: 45),
// For H3.
headlineSmall: TextStyle(fontSize: 35),
// For H4.
titleLarge: TextStyle(fontSize: 25),
// For H5.
titleMedium: TextStyle(fontSize: 15),
// For H6.
titleSmall: TextStyle(fontSize: 10),
),
),
data: Theme.of(context),
// .copyWith(
// textTheme: const TextTheme(
// // For H1.
// headlineLarge: TextStyle(fontSize: 55),
// // For H2.
// headlineMedium: TextStyle(fontSize: 45),
// // For H3.
// headlineSmall: TextStyle(fontSize: 35),
// // For H4.
// titleLarge: TextStyle(fontSize: 25),
// // For H5.
// titleMedium: TextStyle(fontSize: 15),
// // For H6.
// titleSmall: TextStyle(fontSize: 10),
// ),
// ),
child: TexMarkdown(
_controller.text,
textDirection: _direction,
onLinkTab: (url, title) {
log(title, name: "title");
log(url, name: "url");
},
onLinkTab: (url, title) {},
textAlign: TextAlign.justify,
// textScaler: const TextScaler.linear(1.3),
textScaleFactor: 1,
...
...
gpt_markdown/example/pubspec.lock
View file @
e900edd
...
...
@@ -182,7 +182,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.
9
"
version: "0.0.
10
"
http:
dependency: transitive
description:
...
...
gpt_markdown/lib/gpt_markdown.dart
View file @
e900edd
...
...
@@ -36,6 +36,7 @@ class TexMarkdown extends StatelessWidget {
.
replaceAllMapped
(
RegExp
(
r"(?<!\\)\$\$(.*?)(?<!\\)\$\$"
,
dotAll:
true
,
),
(
match
)
=>
"
\\
[
${match[1] ?? ""}
\\
]"
)
.
replaceAllMapped
(
...
...
gpt_markdown/pubspec.yaml
View file @
e900edd
name
:
gpt_markdown
description
:
"
The
purpose
of
this
package
is
to
render
the
response
of
ChatGPT
into
a
Flutter
app."
version
:
0.0.
9
version
:
0.0.
10
homepage
:
https://github.com/saminsohag/flutter_packages/tree/main/gpt_markdown
environment
:
...
...
Please
register
or
login
to post a comment