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-03-29 20:32:05 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
725fac40fe4d9fc3b4fd3a182f1d9fbc77471dac
725fac40
1 parent
a3de047b
maxLines added
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
4 deletions
gpt_markdown/example/android/build.gradle
gpt_markdown/example/lib/main.dart
gpt_markdown/example/macos/Podfile.lock
gpt_markdown/lib/gpt_markdown.dart
gpt_markdown/lib/markdown_component.dart
gpt_markdown/lib/md_widget.dart
gpt_markdown/example/android/build.gradle
View file @
725fac4
buildscript
{
ext
.
kotlin_version
=
'1.
6.1
0'
ext
.
kotlin_version
=
'1.
7.2
0'
repositories
{
google
()
mavenCentral
()
...
...
@@ -26,6 +26,6 @@ subprojects {
project
.
evaluationDependsOn
(
':app'
)
}
task
clean
(
type:
Delete
)
{
task
s
.
register
(
"clean"
,
Delete
)
{
delete
rootProject
.
buildDir
}
...
...
gpt_markdown/example/lib/main.dart
View file @
725fac4
...
...
@@ -178,6 +178,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex
debugPrint(url);
debugPrint(title);
},
maxLines: null,
textAlign: TextAlign.justify,
// textScaler: const TextScaler.linear(1.3),
textScaler: const TextScaler.linear(1),
...
...
gpt_markdown/example/macos/Podfile.lock
View file @
725fac4
...
...
@@ -32,4 +32,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
COCOAPODS: 1.1
4.3
COCOAPODS: 1.1
5.2
...
...
gpt_markdown/lib/gpt_markdown.dart
View file @
725fac4
...
...
@@ -18,6 +18,7 @@ class TexMarkdown extends StatelessWidget {
this
.
onLinkTab
,
this
.
latexBuilder
,
this
.
codeBuilder
,
this
.
maxLines
,
});
final
TextDirection
textDirection
;
final
String
data
;
...
...
@@ -26,6 +27,7 @@ class TexMarkdown extends StatelessWidget {
final
TextScaler
?
textScaler
;
final
void
Function
(
String
url
,
String
title
)?
onLinkTab
;
final
String
Function
(
String
tex
)?
latexWorkaround
;
final
int
?
maxLines
;
final
Widget
Function
(
BuildContext
context
,
String
tex
,
TextStyle
style
,
bool
inline
)?
latexBuilder
;
...
...
@@ -68,6 +70,7 @@ class TexMarkdown extends StatelessWidget {
latexWorkaround:
latexWorkaround
,
latexBuilder:
latexBuilder
,
codeBuilder:
codeBuilder
,
maxLines:
maxLines
,
));
}
}
...
...
gpt_markdown/lib/markdown_component.dart
View file @
725fac4
...
...
@@ -10,7 +10,7 @@ import 'md_widget.dart';
/// Markdown components
abstract
class
MarkdownComponent
{
static
List
<
MarkdownComponent
>
get
components
=>
[
static
final
List
<
MarkdownComponent
>
components
=
[
CodeBlockMd
(),
NewLines
(),
TableMd
(),
...
...
gpt_markdown/lib/md_widget.dart
View file @
725fac4
...
...
@@ -17,6 +17,7 @@ class MdWidget extends StatelessWidget {
this
.
latexBuilder
,
this
.
followLinkColor
=
false
,
this
.
codeBuilder
,
this
.
maxLines
,
});
final
String
exp
;
final
TextDirection
textDirection
;
...
...
@@ -31,6 +32,7 @@ class MdWidget extends StatelessWidget {
final
bool
followLinkColor
;
final
Widget
Function
(
BuildContext
context
,
String
name
,
String
code
)?
codeBuilder
;
final
int
?
maxLines
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -64,6 +66,7 @@ class MdWidget extends StatelessWidget {
textDirection:
textDirection
,
textScaler:
textScaler
,
textAlign:
textAlign
,
maxLines:
maxLines
,
);
}
}
...
...
Please
register
or
login
to post a comment