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-15 11:44:14 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
302a9ceaa51aa5c56d0d7f5a74b13fca0fbef0c2
302a9cea
1 parent
21878592
TextScaler and TextAlign added
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
3 deletions
gpt_markdown/CHANGELOG.md
gpt_markdown/example/lib/main.dart
gpt_markdown/example/pubspec.lock
gpt_markdown/lib/gpt_markdown.dart
gpt_markdown/lib/md_widget.dart
gpt_markdown/pubspec.yaml
gpt_markdown/CHANGELOG.md
View file @
302a9ce
## 0.0.2
*
TextScaler and TextAlign added.
## 0.0.1
*
This package will render response of chatGPT in flutter app.
...
...
gpt_markdown/example/lib/main.dart
View file @
302a9ce
...
...
@@ -165,6 +165,9 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex
log(title, name: "title");
log(url, name: "url");
},
textAlign: TextAlign.justify,
textScaler:
MediaQuery.textScalerOf(context),
style: const TextStyle(
// Regular text font size here.
fontSize: 15,
...
...
gpt_markdown/example/pubspec.lock
View file @
302a9ce
...
...
@@ -182,7 +182,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.
1
"
version: "0.0.
2
"
http:
dependency: transitive
description:
...
...
gpt_markdown/lib/gpt_markdown.dart
View file @
302a9ce
...
...
@@ -12,11 +12,15 @@ class TexMarkdown extends StatelessWidget {
this
.
style
,
this
.
followLinkColor
=
false
,
this
.
textDirection
=
TextDirection
.
ltr
,
this
.
textAlign
,
this
.
textScaler
,
this
.
onLinkTab
,
});
final
TextDirection
textDirection
;
final
String
data
;
final
TextStyle
?
style
;
final
TextAlign
?
textAlign
;
final
TextScaler
?
textScaler
;
final
void
Function
(
String
url
,
String
title
)?
onLinkTab
;
final
bool
followLinkColor
;
...
...
@@ -28,6 +32,8 @@ class TexMarkdown extends StatelessWidget {
textDirection:
textDirection
,
style:
style
,
onLinkTab:
onLinkTab
,
textAlign:
textAlign
,
textScaler:
textScaler
,
followLinkColor:
followLinkColor
,
));
}
...
...
gpt_markdown/lib/md_widget.dart
View file @
302a9ce
...
...
@@ -10,10 +10,14 @@ class MdWidget extends StatelessWidget {
this
.
style
,
this
.
textDirection
=
TextDirection
.
ltr
,
this
.
onLinkTab
,
this
.
textAlign
,
this
.
textScaler
,
this
.
followLinkColor
=
false
});
final
String
exp
;
final
TextDirection
textDirection
;
final
TextStyle
?
style
;
final
TextAlign
?
textAlign
;
final
TextScaler
?
textScaler
;
final
void
Function
(
String
url
,
String
title
)?
onLinkTab
;
final
bool
followLinkColor
;
...
...
@@ -122,9 +126,11 @@ class MdWidget extends StatelessWidget {
return
Text
.
rich
(
TextSpan
(
children:
list
,
style:
style
,
style:
style
?.
copyWith
()
,
),
textDirection:
textDirection
,
textScaler:
textScaler
,
textAlign:
textAlign
,
);
}
}
...
...
gpt_markdown/pubspec.yaml
View file @
302a9ce
name
:
gpt_markdown
description
:
"
The
purpose
of
this
package
is
to
render
the
response
of
ChatGPT
into
a
Flutter
app."
version
:
0.0.
1
version
:
0.0.
2
homepage
:
https://github.com/saminsohag/flutter_packages/tree/main/gpt_markdown
environment
:
...
...
Please
register
or
login
to post a comment