Skip to content

Commit 6cc4357

Browse files
[SuperEditor] - Fix selection highlight alignment for RTL languages and update dependencies in pubspec.lock
1 parent 9decd03 commit 6cc4357

File tree

2 files changed

+58
-53
lines changed

2 files changed

+58
-53
lines changed

super_editor/lib/src/default_editor/text.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,12 +1159,17 @@ class TextComponentState extends State<TextComponent> with DocumentComponent imp
11591159
children: [
11601160
// Selection highlight beneath the text.
11611161
if (widget.text.length > 0)
1162-
TextLayoutSelectionHighlight(
1163-
textLayout: textLayout,
1164-
style: SelectionHighlightStyle(
1165-
color: widget.selectionColor,
1162+
// this should fix the Highlight align in RTL languages
1163+
Positioned(
1164+
left: 0,
1165+
right: 0,
1166+
child: TextLayoutSelectionHighlight(
1167+
textLayout: textLayout,
1168+
style: SelectionHighlightStyle(
1169+
color: Colors.red,
1170+
),
1171+
selection: widget.textSelection ?? const TextSelection.collapsed(offset: -1),
11661172
),
1167-
selection: widget.textSelection ?? const TextSelection.collapsed(offset: -1),
11681173
)
11691174
else if (widget.highlightWhenEmpty)
11701175
TextLayoutEmptyHighlight(

super_text_layout/example/pubspec.lock

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a
8+
sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "61.0.0"
11+
version: "80.0.0"
1212
analyzer:
1313
dependency: transitive
1414
description:
1515
name: analyzer
16-
sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562
16+
sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "5.13.0"
19+
version: "7.3.0"
2020
args:
2121
dependency: transitive
2222
description:
@@ -29,50 +29,50 @@ packages:
2929
dependency: transitive
3030
description:
3131
name: async
32-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
32+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "2.11.0"
35+
version: "2.12.0"
3636
attributed_text:
3737
dependency: transitive
3838
description:
3939
name: attributed_text
40-
sha256: fb65cf441784612544eda4d5df7a3caad56e7f673c68bf1d48d9048228375189
40+
sha256: "9d8bdc6e54387f31e52d2dcc3d93d656072582a44bcaa855c9ea8b3b2fa7abd3"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "0.4.0"
43+
version: "0.4.4"
4444
boolean_selector:
4545
dependency: transitive
4646
description:
4747
name: boolean_selector
48-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
48+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "2.1.1"
51+
version: "2.1.2"
5252
characters:
5353
dependency: transitive
5454
description:
5555
name: characters
56-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
56+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "1.3.0"
59+
version: "1.4.0"
6060
clock:
6161
dependency: transitive
6262
description:
6363
name: clock
64-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
64+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
6565
url: "https://pub.dev"
6666
source: hosted
67-
version: "1.1.1"
67+
version: "1.1.2"
6868
collection:
6969
dependency: transitive
7070
description:
7171
name: collection
72-
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
72+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
7373
url: "https://pub.dev"
7474
source: hosted
75-
version: "1.19.0"
75+
version: "1.19.1"
7676
convert:
7777
dependency: transitive
7878
description:
@@ -101,10 +101,10 @@ packages:
101101
dependency: transitive
102102
description:
103103
name: fake_async
104-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
104+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
105105
url: "https://pub.dev"
106106
source: hosted
107-
version: "1.3.1"
107+
version: "1.3.2"
108108
file:
109109
dependency: transitive
110110
description:
@@ -183,18 +183,18 @@ packages:
183183
dependency: transitive
184184
description:
185185
name: leak_tracker
186-
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
186+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
187187
url: "https://pub.dev"
188188
source: hosted
189-
version: "10.0.7"
189+
version: "10.0.8"
190190
leak_tracker_flutter_testing:
191191
dependency: transitive
192192
description:
193193
name: leak_tracker_flutter_testing
194-
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
194+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
195195
url: "https://pub.dev"
196196
source: hosted
197-
version: "3.0.8"
197+
version: "3.0.9"
198198
leak_tracker_testing:
199199
dependency: transitive
200200
description:
@@ -223,10 +223,10 @@ packages:
223223
dependency: transitive
224224
description:
225225
name: matcher
226-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
226+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
227227
url: "https://pub.dev"
228228
source: hosted
229-
version: "0.12.16+1"
229+
version: "0.12.17"
230230
material_color_utilities:
231231
dependency: transitive
232232
description:
@@ -239,10 +239,10 @@ packages:
239239
dependency: transitive
240240
description:
241241
name: meta
242-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
242+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
243243
url: "https://pub.dev"
244244
source: hosted
245-
version: "1.15.0"
245+
version: "1.16.0"
246246
mime:
247247
dependency: transitive
248248
description:
@@ -271,10 +271,10 @@ packages:
271271
dependency: transitive
272272
description:
273273
name: path
274-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
274+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
275275
url: "https://pub.dev"
276276
source: hosted
277-
version: "1.9.0"
277+
version: "1.9.1"
278278
pool:
279279
dependency: transitive
280280
description:
@@ -348,73 +348,73 @@ packages:
348348
dependency: transitive
349349
description:
350350
name: source_span
351-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
351+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
352352
url: "https://pub.dev"
353353
source: hosted
354-
version: "1.10.0"
354+
version: "1.10.1"
355355
stack_trace:
356356
dependency: transitive
357357
description:
358358
name: stack_trace
359-
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
359+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
360360
url: "https://pub.dev"
361361
source: hosted
362-
version: "1.12.0"
362+
version: "1.12.1"
363363
stream_channel:
364364
dependency: transitive
365365
description:
366366
name: stream_channel
367-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
367+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
368368
url: "https://pub.dev"
369369
source: hosted
370-
version: "2.1.2"
370+
version: "2.1.4"
371371
string_scanner:
372372
dependency: transitive
373373
description:
374374
name: string_scanner
375-
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
375+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
376376
url: "https://pub.dev"
377377
source: hosted
378-
version: "1.3.0"
378+
version: "1.4.1"
379379
super_text_layout:
380380
dependency: "direct main"
381381
description:
382382
path: ".."
383383
relative: true
384384
source: path
385-
version: "0.1.17"
385+
version: "0.1.18"
386386
term_glyph:
387387
dependency: transitive
388388
description:
389389
name: term_glyph
390-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
390+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
391391
url: "https://pub.dev"
392392
source: hosted
393-
version: "1.2.1"
393+
version: "1.2.2"
394394
test:
395395
dependency: transitive
396396
description:
397397
name: test
398-
sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f"
398+
sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e"
399399
url: "https://pub.dev"
400400
source: hosted
401-
version: "1.25.8"
401+
version: "1.25.15"
402402
test_api:
403403
dependency: transitive
404404
description:
405405
name: test_api
406-
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
406+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
407407
url: "https://pub.dev"
408408
source: hosted
409-
version: "0.7.3"
409+
version: "0.7.4"
410410
test_core:
411411
dependency: transitive
412412
description:
413413
name: test_core
414-
sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d"
414+
sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa"
415415
url: "https://pub.dev"
416416
source: hosted
417-
version: "0.6.5"
417+
version: "0.6.8"
418418
typed_data:
419419
dependency: transitive
420420
description:
@@ -435,10 +435,10 @@ packages:
435435
dependency: transitive
436436
description:
437437
name: vm_service
438-
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
438+
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
439439
url: "https://pub.dev"
440440
source: hosted
441-
version: "14.3.0"
441+
version: "14.3.1"
442442
watcher:
443443
dependency: transitive
444444
description:
@@ -472,5 +472,5 @@ packages:
472472
source: hosted
473473
version: "3.1.2"
474474
sdks:
475-
dart: ">=3.4.0 <4.0.0"
475+
dart: ">=3.7.0-0 <4.0.0"
476476
flutter: ">=3.18.0-18.0.pre.54"

0 commit comments

Comments
 (0)