saminsohag

Highlighted text added

@@ -259,7 +259,7 @@ @@ -259,7 +259,7 @@
259 isa = PBXProject; 259 isa = PBXProject;
260 attributes = { 260 attributes = {
261 LastSwiftUpdateCheck = 0920; 261 LastSwiftUpdateCheck = 0920;
262 - LastUpgradeCheck = 1430; 262 + LastUpgradeCheck = 1510;
263 ORGANIZATIONNAME = ""; 263 ORGANIZATIONNAME = "";
264 TargetAttributes = { 264 TargetAttributes = {
265 331C80D4294CF70F00263BE5 = { 265 331C80D4294CF70F00263BE5 = {
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <Scheme 2 <Scheme
3 - LastUpgradeVersion = "1430" 3 + LastUpgradeVersion = "1510"
4 version = "1.3"> 4 version = "1.3">
5 <BuildAction 5 <BuildAction
6 parallelizeBuildables = "YES" 6 parallelizeBuildables = "YES"
@@ -215,6 +215,30 @@ packages: @@ -215,6 +215,30 @@ packages:
215 url: "https://pub.dev" 215 url: "https://pub.dev"
216 source: hosted 216 source: hosted
217 version: "0.6.7" 217 version: "0.6.7"
  218 + leak_tracker:
  219 + dependency: transitive
  220 + description:
  221 + name: leak_tracker
  222 + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
  223 + url: "https://pub.dev"
  224 + source: hosted
  225 + version: "10.0.0"
  226 + leak_tracker_flutter_testing:
  227 + dependency: transitive
  228 + description:
  229 + name: leak_tracker_flutter_testing
  230 + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
  231 + url: "https://pub.dev"
  232 + source: hosted
  233 + version: "2.0.1"
  234 + leak_tracker_testing:
  235 + dependency: transitive
  236 + description:
  237 + name: leak_tracker_testing
  238 + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
  239 + url: "https://pub.dev"
  240 + source: hosted
  241 + version: "2.0.1"
218 lints: 242 lints:
219 dependency: transitive 243 dependency: transitive
220 description: 244 description:
@@ -227,26 +251,26 @@ packages: @@ -227,26 +251,26 @@ packages:
227 dependency: transitive 251 dependency: transitive
228 description: 252 description:
229 name: matcher 253 name: matcher
230 - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" 254 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
231 url: "https://pub.dev" 255 url: "https://pub.dev"
232 source: hosted 256 source: hosted
233 - version: "0.12.16" 257 + version: "0.12.16+1"
234 material_color_utilities: 258 material_color_utilities:
235 dependency: transitive 259 dependency: transitive
236 description: 260 description:
237 name: material_color_utilities 261 name: material_color_utilities
238 - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" 262 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
239 url: "https://pub.dev" 263 url: "https://pub.dev"
240 source: hosted 264 source: hosted
241 - version: "0.5.0" 265 + version: "0.8.0"
242 meta: 266 meta:
243 dependency: transitive 267 dependency: transitive
244 description: 268 description:
245 name: meta 269 name: meta
246 - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e 270 + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
247 url: "https://pub.dev" 271 url: "https://pub.dev"
248 source: hosted 272 source: hosted
249 - version: "1.10.0" 273 + version: "1.11.0"
250 nested: 274 nested:
251 dependency: transitive 275 dependency: transitive
252 description: 276 description:
@@ -259,10 +283,10 @@ packages: @@ -259,10 +283,10 @@ packages:
259 dependency: transitive 283 dependency: transitive
260 description: 284 description:
261 name: path 285 name: path
262 - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" 286 + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
263 url: "https://pub.dev" 287 url: "https://pub.dev"
264 source: hosted 288 source: hosted
265 - version: "1.8.3" 289 + version: "1.9.0"
266 path_parsing: 290 path_parsing:
267 dependency: transitive 291 dependency: transitive
268 description: 292 description:
@@ -588,6 +612,14 @@ packages: @@ -588,6 +612,14 @@ packages:
588 url: "https://pub.dev" 612 url: "https://pub.dev"
589 source: hosted 613 source: hosted
590 version: "2.1.4" 614 version: "2.1.4"
  615 + vm_service:
  616 + dependency: transitive
  617 + description:
  618 + name: vm_service
  619 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
  620 + url: "https://pub.dev"
  621 + source: hosted
  622 + version: "13.0.0"
591 web: 623 web:
592 dependency: transitive 624 dependency: transitive
593 description: 625 description:
@@ -22,6 +22,7 @@ abstract class MarkdownComponent { @@ -22,6 +22,7 @@ abstract class MarkdownComponent {
22 HrLine(), 22 HrLine(),
23 ImageMd(), 23 ImageMd(),
24 BoldMd(), 24 BoldMd(),
  25 + HighlightedText(),
25 LatexMathMultyLine(), 26 LatexMathMultyLine(),
26 LatexMath(), 27 LatexMath(),
27 ItalicMd(), 28 ItalicMd(),
@@ -468,6 +469,40 @@ class OrderedList extends BlockMd { @@ -468,6 +469,40 @@ class OrderedList extends BlockMd {
468 } 469 }
469 } 470 }
470 471
  472 +class HighlightedText extends InlineMd {
  473 + @override
  474 + RegExp get exp => RegExp(r"`.*?`");
  475 +
  476 + @override
  477 + InlineSpan span(
  478 + BuildContext context,
  479 + String text,
  480 + TextStyle? style,
  481 + TextDirection textDirection,
  482 + final void Function(String url, String title)? onLinkTab,
  483 + final String Function(String tex)? latexWorkaround,
  484 + final Widget Function(BuildContext context, String tex)? latexBuilder,
  485 + ) {
  486 + return TextSpan(
  487 + text: text,
  488 + style: style?.copyWith(
  489 + fontWeight: FontWeight.bold,
  490 + background: Paint()
  491 + ..color = Theme.of(context).colorScheme.surfaceVariant
  492 + ..strokeCap = StrokeCap.round
  493 + ..strokeJoin = StrokeJoin.round,
  494 + ) ??
  495 + TextStyle(
  496 + fontWeight: FontWeight.bold,
  497 + background: Paint()
  498 + ..color = Theme.of(context).colorScheme.surfaceVariant
  499 + ..strokeCap = StrokeCap.round
  500 + ..strokeJoin = StrokeJoin.round,
  501 + ),
  502 + );
  503 + }
  504 +}
  505 +
471 /// Bold text component 506 /// Bold text component
472 class BoldMd extends InlineMd { 507 class BoldMd extends InlineMd {
473 @override 508 @override