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-07-10 23:13:18 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20055bb194ee1a5d54139221c155580327247f18
20055bb1
1 parent
bb1c4dfd
[source added]
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
181 additions
and
123 deletions
gpt_markdown/CHANGELOG.md
gpt_markdown/example/macos/Podfile.lock
gpt_markdown/example/pubspec.lock
gpt_markdown/example/pubspec.yaml
gpt_markdown/lib/custom_widgets/custom_error_image.dart
gpt_markdown/lib/markdown_component.dart
gpt_markdown/pubspec.yaml
gpt_markdown/CHANGELOG.md
View file @
20055bb
## 0.1.4
*
`[source]`
format added.
## 0.1.3
*
`maxLines`
Parameter added.
...
...
gpt_markdown/example/macos/Podfile.lock
View file @
20055bb
...
...
@@ -26,9 +26,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
path_provider_foundation:
3784922295ac71e43754bd15e0653ccfd36a147c
path_provider_foundation:
2b6b4c569c0fb62ec74538f866245ac84301af46
printing: 1dd6a1fce2209ec240698e2439a4adbb9b427637
url_launcher_macos:
d2691c7dd33ed713bf3544850a623080ec693d95
url_launcher_macos:
5f437abeda8c85500ceb03f5c1938a8c5a705399
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
...
...
gpt_markdown/example/pubspec.lock
View file @
20055bb
...
...
@@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: archive
sha256:
"22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
sha256:
cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.
4.10
"
version: "3.
6.1
"
args:
dependency: transitive
description:
name: args
sha256:
eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
sha256:
"7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.
4.2
"
version: "2.
5.0
"
async:
dependency: transitive
description:
...
...
@@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: barcode
sha256:
"91b143666f7bb13636f716b6d4e412e372ab15ff7969799af8c9e30a382e9385"
sha256:
ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003
url: "https://pub.dev"
source: hosted
version: "2.2.
6
"
version: "2.2.
8
"
bidi:
dependency: transitive
description:
...
...
@@ -73,14 +73,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.18.0"
c
onvert
:
c
ross_file
:
dependency: transitive
description:
name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
name: cross_file
sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
url: "https://pub.dev"
source: hosted
version: "
3.1.
1"
version: "
0.3.4+
1"
crypto:
dependency: transitive
description:
...
...
@@ -93,10 +93,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256:
d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256:
ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.
6
"
version: "1.0.
8
"
fake_async:
dependency: transitive
description:
...
...
@@ -109,18 +109,18 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "
7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878
"
sha256: "
493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21
"
url: "https://pub.dev"
source: hosted
version: "2.1.
0
"
version: "2.1.
2
"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256:
be325344c1f3070354a1d84a231a1ba75ea85d413774ec4bdf444c023342e030
sha256:
"824f5b9f389bfc4dddac3dea76cd70c51092d9dff0b2ece7ef4f53db8547d258"
url: "https://pub.dev"
source: hosted
version: "
5.5.0
"
version: "
8.0.6
"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -138,10 +138,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256:
a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
sha256:
"3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
url: "https://pub.dev"
source: hosted
version: "
2.0.3
"
version: "
4.0.0
"
flutter_math_fork:
dependency: "direct main"
description:
...
...
@@ -154,18 +154,18 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256:
b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
sha256:
c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e
url: "https://pub.dev"
source: hosted
version: "2.0.
17
"
version: "2.0.
20
"
flutter_svg:
dependency: transitive
description:
name: flutter_svg
sha256:
d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
sha256:
"7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
url: "https://pub.dev"
source: hosted
version: "2.0.
9
"
version: "2.0.
10+1
"
flutter_test:
dependency: "direct dev"
description: flutter
...
...
@@ -182,15 +182,15 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.
3
"
version: "0.1.
4
"
http:
dependency: transitive
description:
name: http
sha256:
a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
sha256:
"761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
url: "https://pub.dev"
source: hosted
version: "1.2.
0
"
version: "1.2.
1
"
http_parser:
dependency: transitive
description:
...
...
@@ -203,50 +203,42 @@ packages:
dependency: transitive
description:
name: image
sha256: "004a2e90ce080f8627b5a04aecb4cdfac87d2c3f3b520aa291260be5a32c033d"
url: "https://pub.dev"
source: hosted
version: "4.1.4"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "
0.6.7
"
version: "
4.2.0
"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7
8eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323f
a"
sha256: "7
f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341
a"
url: "https://pub.dev"
source: hosted
version: "10.0.
0
"
version: "10.0.
4
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256:
"06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "
2.0.1
"
version: "
3.0.3
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256:
a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256:
"6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "
2
.0.1"
version: "
3
.0.1"
lints:
dependency: transitive
description:
name: lints
sha256: "
0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452
"
sha256: "
976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235
"
url: "https://pub.dev"
source: hosted
version: "
2.1.1
"
version: "
4.0.0
"
matcher:
dependency: transitive
description:
...
...
@@ -267,10 +259,10 @@ packages:
dependency: transitive
description:
name: meta
sha256:
d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256:
"7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
version: "1.1
1
.0"
version: "1.1
2
.0"
nested:
dependency: transitive
description:
...
...
@@ -299,26 +291,26 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256:
b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
sha256:
c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.
2
"
version: "2.1.
3
"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "
477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668
"
sha256: "
30c5aa827a6ae95ce2853cdc5fe3971daaac00f6f081c419c013f7f57bff2f5e
"
url: "https://pub.dev"
source: hosted
version: "2.2.
2
"
version: "2.2.
7
"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256:
"5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
sha256:
f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
url: "https://pub.dev"
source: hosted
version: "2.
3.2
"
version: "2.
4.0
"
path_provider_linux:
dependency: transitive
description:
...
...
@@ -339,58 +331,74 @@ packages:
dependency: transitive
description:
name: path_provider_windows
sha256:
"8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
sha256:
bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
url: "https://pub.dev"
source: hosted
version: "2.
2.1
"
version: "2.
3.0
"
pdf:
dependency: "direct main"
description:
name: pdf
sha256: "
93cbb2c06de9bab91844550f19896b2373e7a5ce25173995e7e5ec5e1741429d
"
sha256: "
81d5522bddc1ef5c28e8f0ee40b71708761753c163e0c93a40df56fd515ea0f0
"
url: "https://pub.dev"
source: hosted
version: "3.10.7"
version: "3.11.0"
pdf_widget_wrapper:
dependency: transitive
description:
name: pdf_widget_wrapper
sha256: c930860d987213a3d58c7ec3b7ecf8085c3897f773e8dc23da9cae60a5d6d0f5
url: "https://pub.dev"
source: hosted
version: "1.0.4"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256:
bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5
sha256:
"18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
url: "https://pub.dev"
source: hosted
version: "1
0.4.5
"
version: "1
1.3.1
"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256:
"59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47"
sha256:
b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54
url: "https://pub.dev"
source: hosted
version: "1
0.3.6
"
version: "1
2.0.7
"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0
url: "https://pub.dev"
source: hosted
version: "9.4.5"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d"
url: "https://pub.dev"
source: hosted
version: "
9.1.4
"
version: "
0.1.1
"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "
6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4
"
sha256: "
48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20
"
url: "https://pub.dev"
source: hosted
version: "
3.12.0
"
version: "
4.2.1
"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256:
cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
sha256:
"1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.
1.3
"
version: "0.
2.1
"
petitparser:
dependency: transitive
description:
...
...
@@ -403,10 +411,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "
12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec
"
sha256: "
9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65
"
url: "https://pub.dev"
source: hosted
version: "3.1.
4
"
version: "3.1.
5
"
plugin_platform_interface:
dependency: transitive
description:
...
...
@@ -415,30 +423,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.8"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29"
url: "https://pub.dev"
source: hosted
version: "3.7.4"
printing:
dependency: "direct main"
description:
name: printing
sha256:
ad39a42a5f83125952457dfd94f395c8cf0eb1f7759583dadb769be5c7f99d24
sha256:
cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3
url: "https://pub.dev"
source: hosted
version: "5.1
1
.1"
version: "5.1
3
.1"
provider:
dependency: transitive
description:
name: provider
sha256:
"9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
sha256:
c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.
1
"
version: "6.1.
2
"
qr:
dependency: transitive
description:
...
...
@@ -496,10 +496,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "
5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b
"
sha256: "
9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f
"
url: "https://pub.dev"
source: hosted
version: "0.
6.1
"
version: "0.
7.0
"
tuple:
dependency: transitive
description:
...
...
@@ -520,26 +520,26 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256:
d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96
sha256:
"21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3"
url: "https://pub.dev"
source: hosted
version: "6.
2.3
"
version: "6.
3.0
"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256:
"507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
sha256:
ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf
url: "https://pub.dev"
source: hosted
version: "6.
2.2
"
version: "6.
3.3
"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7
5bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03
"
sha256: "7
068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89
"
url: "https://pub.dev"
source: hosted
version: "6.
2.4
"
version: "6.
3.0
"
url_launcher_linux:
dependency: transitive
description:
...
...
@@ -552,26 +552,26 @@ packages:
dependency: transitive
description:
name: url_launcher_macos
sha256:
b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
sha256:
"9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
url: "https://pub.dev"
source: hosted
version: "3.
1
.0"
version: "3.
2
.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256:
a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f
sha256:
"552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.
1
"
version: "2.3.
2
"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256:
fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
sha256:
"8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
url: "https://pub.dev"
source: hosted
version: "2.
2.3
"
version: "2.
3.1
"
url_launcher_windows:
dependency: transitive
description:
...
...
@@ -584,26 +584,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "
18f6690295af52d081f6808f2f7c69f0eed6d7e23a71539d75f4aeb8f0062172
"
sha256: "
32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3
"
url: "https://pub.dev"
source: hosted
version: "1.1.
9+2
"
version: "1.1.
11+1
"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256:
"531d20465c10dfac7f5cd90b60bbe4dd9921f1ec4ca54c83ebb176dbacb7bb2d"
sha256:
c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.
9+2
"
version: "1.1.
11+1
"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "
03012b0a33775c5530576b70240308080e1d5050f0faf000118c20e6463bc0ad
"
sha256: "
12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81
"
url: "https://pub.dev"
source: hosted
version: "1.1.
9+2
"
version: "1.1.
11+1
"
vector_math:
dependency: transitive
description:
...
...
@@ -616,26 +616,26 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256:
"3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "1
3.0.0
"
version: "1
4.2.1
"
web:
dependency: transitive
description:
name: web
sha256:
afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
sha256:
"97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.
3.0
"
version: "0.
5.1
"
win32:
dependency: transitive
description:
name: win32
sha256:
"464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256:
a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4
url: "https://pub.dev"
source: hosted
version: "5.
2.0
"
version: "5.
5.1
"
xdg_directories:
dependency: transitive
description:
...
...
@@ -653,5 +653,5 @@ packages:
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
...
...
gpt_markdown/example/pubspec.yaml
View file @
20055bb
...
...
@@ -18,13 +18,13 @@ dependencies:
flutter_html_to_pdf
:
^0.7.0
url_launcher
:
^6.1.10
path_provider
:
^2.0.14
permission_handler
:
^10.2.0
file_picker
:
^5.2.10
permission_handler
:
^11.3.1
file_picker
:
^8.0.6
flutter_math_fork
:
^0.7.2
dev_dependencies
:
flutter_test
:
sdk
:
flutter
flutter_lints
:
^
2
.0.0
flutter_lints
:
^
4
.0.0
flutter
:
uses-material-design
:
true
\ No newline at end of file
...
...
gpt_markdown/lib/custom_widgets/custom_error_image.dart
View file @
20055bb
...
...
@@ -18,7 +18,7 @@ class CustomImageError extends LeafRenderObjectWidget {
RenderObject
createRenderObject
(
BuildContext
context
)
{
return
RenderCustomImageError
(
iconColor
??
Theme
.
of
(
context
).
colorScheme
.
onSurfaceVariant
,
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surface
Varian
t
,
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surface
ContainerHighes
t
,
outlineColor
??
Theme
.
of
(
context
).
colorScheme
.
outline
,
);
}
...
...
@@ -26,8 +26,8 @@ class CustomImageError extends LeafRenderObjectWidget {
@override
void
updateRenderObject
(
BuildContext
context
,
covariant
RenderCustomImageError
renderObject
)
{
renderObject
.
_backgroundColor
=
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surfaceVariant
;
renderObject
.
_backgroundColor
=
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surfaceContainerHighest
;
renderObject
.
_iconColor
=
iconColor
??
Theme
.
of
(
context
).
colorScheme
.
onSurfaceVariant
;
renderObject
.
_outlineColor
=
...
...
@@ -133,7 +133,7 @@ class CustomImageLoading extends LeafRenderObjectWidget {
RenderObject
createRenderObject
(
BuildContext
context
)
{
return
RenderCustomImageLoading
(
iconColor
??
Theme
.
of
(
context
).
colorScheme
.
onSurfaceVariant
,
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surface
Varian
t
,
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surface
ContainerHighes
t
,
outlineColor
??
Theme
.
of
(
context
).
colorScheme
.
outline
,
progress
,
);
...
...
@@ -142,8 +142,8 @@ class CustomImageLoading extends LeafRenderObjectWidget {
@override
void
updateRenderObject
(
BuildContext
context
,
covariant
RenderCustomImageLoading
renderObject
)
{
renderObject
.
_backgroundColor
=
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surfaceVariant
;
renderObject
.
_backgroundColor
=
backgroundColor
??
Theme
.
of
(
context
).
colorScheme
.
surfaceContainerHighest
;
renderObject
.
_iconColor
=
iconColor
??
Theme
.
of
(
context
).
colorScheme
.
onSurfaceVariant
;
renderObject
.
_outlineColor
=
...
...
gpt_markdown/lib/markdown_component.dart
View file @
20055bb
...
...
@@ -28,6 +28,7 @@ abstract class MarkdownComponent {
LatexMath
(),
ItalicMd
(),
ATagMd
(),
SourceTag
(),
];
/// Generate widget for markdown widget
...
...
@@ -560,14 +561,14 @@ class HighlightedText extends InlineMd {
style:
style
?.
copyWith
(
fontWeight:
FontWeight
.
bold
,
background:
Paint
()
..
color
=
Theme
.
of
(
context
).
colorScheme
.
surface
Varian
t
..
color
=
Theme
.
of
(
context
).
colorScheme
.
surface
ContainerHighes
t
..
strokeCap
=
StrokeCap
.
round
..
strokeJoin
=
StrokeJoin
.
round
,
)
??
TextStyle
(
fontWeight:
FontWeight
.
bold
,
background:
Paint
()
..
color
=
Theme
.
of
(
context
).
colorScheme
.
surface
Varian
t
..
color
=
Theme
.
of
(
context
).
colorScheme
.
surface
ContainerHighes
t
..
strokeCap
=
StrokeCap
.
round
..
strokeJoin
=
StrokeJoin
.
round
,
),
...
...
@@ -794,6 +795,57 @@ class ItalicMd extends InlineMd {
}
}
/// source text component
class
SourceTag
extends
InlineMd
{
@override
RegExp
get
exp
=>
RegExp
(
r"\[(\d+?)\]"
);
@override
InlineSpan
span
(
BuildContext
context
,
String
text
,
TextStyle
?
style
,
TextDirection
textDirection
,
final
void
Function
(
String
url
,
String
title
)?
onLinkTab
,
final
String
Function
(
String
tex
)?
latexWorkaround
,
final
Widget
Function
(
BuildContext
context
,
String
tex
,
TextStyle
textStyle
,
bool
inline
)?
latexBuilder
,
final
Widget
Function
(
BuildContext
context
,
String
name
,
String
code
)?
codeBuilder
,
)
{
var
match
=
exp
.
firstMatch
(
text
.
trim
());
if
(
match
?[
1
]
==
null
)
{
return
const
TextSpan
();
}
return
WidgetSpan
(
alignment:
PlaceholderAlignment
.
middle
,
// baseline: TextBaseline.alphabetic,
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
2
),
child:
Container
(
width:
20
,
height:
20
,
decoration:
ShapeDecoration
(
shape:
const
OvalBorder
(),
// color: Theme.of(context).colorScheme.onSurface,
color:
Theme
.
of
(
context
).
colorScheme
.
surfaceContainerHighest
,
// borderRadius: BorderRadius.circular(100),
),
child:
FittedBox
(
fit:
BoxFit
.
contain
,
child:
Text
(
"
${match?[1]}
"
,
// style: (style ?? const TextStyle()).copyWith(),
textDirection:
textDirection
,
),
),
),
),
);
}
}
/// Link text component
class
ATagMd
extends
InlineMd
{
@override
...
...
@@ -963,7 +1015,9 @@ class TableMd extends BlockMd {
decoration:
(
heading
)
?
BoxDecoration
(
color:
(
entry
.
key
==
0
)
?
Theme
.
of
(
context
).
colorScheme
.
surfaceVariant
?
Theme
.
of
(
context
)
.
colorScheme
.
surfaceContainerHighest
:
null
,
)
:
null
,
...
...
gpt_markdown/pubspec.yaml
View file @
20055bb
name
:
gpt_markdown
description
:
"
The
purpose
of
this
package
is
to
render
the
response
of
ChatGPT
into
a
Flutter
app."
version
:
0.1.
3
version
:
0.1.
4
homepage
:
https://github.com/saminsohag/flutter_packages/tree/main/gpt_markdown
environment
:
...
...
@@ -15,7 +15,7 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
flutter_lints
:
^
2
.0.0
flutter_lints
:
^
4
.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
Please
register
or
login
to post a comment