Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-31 13:10:09 +08:00
parent dbc7bcd0dd
commit 8964197b73
68 changed files with 560 additions and 293 deletions

View File

@@ -85,11 +85,9 @@ class RichTextEditingDeltaInsertion extends TextEditingDeltaInsertion
this.emote,
this.id,
this.rawText,
}) {
this.type =
type ??
(composing.isValid ? RichTextType.composing : RichTextType.text);
}
}) : type =
type ??
(composing.isValid ? RichTextType.composing : RichTextType.text);
@override
late final RichTextType type;
@@ -116,11 +114,9 @@ class RichTextEditingDeltaReplacement extends TextEditingDeltaReplacement
this.emote,
this.id,
this.rawText,
}) {
this.type =
type ??
(composing.isValid ? RichTextType.composing : RichTextType.text);
}
}) : type =
type ??
(composing.isValid ? RichTextType.composing : RichTextType.text);
@override
late final RichTextType type;
@@ -158,9 +154,7 @@ class RichTextItem {
required this.range,
this.emote,
this.id,
}) {
_rawText = rawText;
}
}) : _rawText = rawText;
RichTextItem.fromStart(
this.text, {
@@ -168,10 +162,8 @@ class RichTextItem {
this.type = RichTextType.text,
this.emote,
this.id,
}) {
range = TextRange(start: 0, end: text.length);
_rawText = rawText;
}
}) : range = TextRange(start: 0, end: text.length),
_rawText = rawText;
List<RichTextItem>? onInsert(
TextEditingDeltaInsertion delta,