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
SUY
2024-02-21 11:31:11 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3deffc8f7b4223062c21857274f480b538a8b459
3deffc8f
1 parent
77493f1a
Refactor MdWidget constructor
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
gpt_markdown/lib/md_widget.dart
gpt_markdown/lib/md_widget.dart
View file @
3deffc8
...
...
@@ -5,8 +5,9 @@ import 'package:gpt_markdown/markdown_component.dart';
/// It creates a markdown widget closed to each other.
class
MdWidget
extends
StatelessWidget
{
const
MdWidget
(
this
.
exp
,
{
super
.
key
,
const
MdWidget
(
this
.
exp
,
{
super
.
key
,
this
.
style
,
this
.
textDirection
=
TextDirection
.
ltr
,
this
.
onLinkTab
,
...
...
@@ -14,7 +15,9 @@ class MdWidget extends StatelessWidget {
this
.
textScaleFactor
,
this
.
latexWorkaround
,
this
.
latexBuilder
,
this
.
followLinkColor
=
false
});
this
.
followLinkColor
=
false
,
this
.
codeBuilder
,
});
final
String
exp
;
final
TextDirection
textDirection
;
final
TextStyle
?
style
;
...
...
@@ -24,6 +27,7 @@ class MdWidget extends StatelessWidget {
final
String
Function
(
String
tex
)?
latexWorkaround
;
final
Widget
Function
(
BuildContext
context
,
String
tex
)?
latexBuilder
;
final
bool
followLinkColor
;
final
Widget
Function
(
BuildContext
context
,
String
tex
)?
codeBuilder
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -46,6 +50,7 @@ class MdWidget extends StatelessWidget {
onLinkTab
,
latexWorkaround
,
latexBuilder
,
codeBuilder
,
),
);
return
Text
.
rich
(
...
...
Please
register
or
login
to post a comment