Skip to content

Commit a737c13

Browse files
Rename constructors
1 parent 218118c commit a737c13

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

super_editor/example/lib/demos/components/demo_text_with_hint.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class _TextWithHintDemoState extends State<TextWithHintDemo> {
143143
/// Add a new component builder to the front of the list
144144
/// that knows how to render header widgets with hint text.
145145
componentBuilders: [
146-
HintComponentBuilder.attributed(
146+
HintComponentBuilder.richText(
147147
AttributedText(
148148
'Header goes here...',
149149
AttributedSpans(

super_editor/example_chat/lib/message_page_scaffold_demo/demo_super_editor_message_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class _ChatEditorState extends State<_ChatEditor> {
433433
shrinkWrap: false,
434434
stylesheet: _chatStylesheet,
435435
componentBuilders: [
436-
HintComponentBuilder.basic(
436+
HintComponentBuilder.plainText(
437437
"Send a message...",
438438
hintStyleBuilder: _hintTextStyleBuilder,
439439
),

super_editor/lib/src/default_editor/paragraph.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class HintComponentBuilder extends ParagraphComponentBuilder {
292292
/// Either a [hintTextStyle] or a [hintStyleBuilder] must be provided to style the hint text.
293293
///
294294
/// The [shouldShowHint] determines whether to show the hint for a given [DocumentNode].
295-
HintComponentBuilder.attributed(
295+
HintComponentBuilder.richText(
296296
this.hint, {
297297
this.shouldShowHint = defaultShowHintDelegate,
298298
TextStyle? hintTextStyle,
@@ -308,7 +308,7 @@ class HintComponentBuilder extends ParagraphComponentBuilder {
308308
/// Either a [hintTextStyle] or a [hintStyleBuilder] must be provided to style the hint text.
309309
///
310310
/// The [shouldShowHint] determines whether to show the hint for a given [DocumentNode].
311-
HintComponentBuilder.basic(
311+
HintComponentBuilder.plainText(
312312
String hint, {
313313
this.shouldShowHint = defaultShowHintDelegate,
314314
TextStyle? hintTextStyle,

super_editor/test/super_editor/components/hint_text_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void main() {
2222
],
2323
))
2424
.withComponentBuilders([
25-
HintComponentBuilder.basic(
25+
HintComponentBuilder.plainText(
2626
"Hello",
2727
hintTextStyle: const TextStyle(),
2828
),
@@ -68,7 +68,7 @@ void main() {
6868
))
6969
.withAddedComponents(
7070
[
71-
HintComponentBuilder.basic(
71+
HintComponentBuilder.plainText(
7272
"This is a hint",
7373
hintTextStyle: const TextStyle(),
7474
shouldShowHint: (document, node) => document.getNodeIndexById(node.id) == 0 && node.text.isEmpty,
@@ -86,7 +86,7 @@ void main() {
8686
.withSingleEmptyParagraph()
8787
.withAddedComponents(
8888
[
89-
HintComponentBuilder.basic(
89+
HintComponentBuilder.plainText(
9090
"This is a hint",
9191
hintTextStyle: const TextStyle(color: Colors.red),
9292
),
@@ -113,7 +113,7 @@ void main() {
113113
.withSingleEmptyParagraph()
114114
.withAddedComponents(
115115
[
116-
HintComponentBuilder.basic(
116+
HintComponentBuilder.plainText(
117117
"This is a hint",
118118
hintStyleBuilder: (context, attributions) => const TextStyle(color: Colors.red),
119119
),
@@ -140,7 +140,7 @@ void main() {
140140
.withSingleEmptyParagraph()
141141
.withAddedComponents(
142142
[
143-
HintComponentBuilder.attributed(
143+
HintComponentBuilder.richText(
144144
AttributedText(
145145
"This is a hint",
146146
// The word "hint" has italics.

super_editor/test/super_editor/supereditor_components_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
await tester //
1717
.createDocument()
1818
.withSingleEmptyParagraph()
19-
.withAddedComponents([HintComponentBuilder.basic("Hello", hintTextStyle: const TextStyle())])
19+
.withAddedComponents([HintComponentBuilder.plainText("Hello", hintTextStyle: const TextStyle())])
2020
.autoFocus(false)
2121
.pump();
2222

0 commit comments

Comments
 (0)