Skip to content

Commit c7863c0

Browse files
committed
compose [nfc]: Give Compose{Content,Topic}Controller a starting-text param
1 parent 18fee48 commit c7863c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/widgets/compose_box.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const double _composeButtonSize = 44;
8282
///
8383
/// Subclasses must ensure that [_update] is called in all exposed constructors.
8484
abstract class ComposeController<ErrorT> extends TextEditingController {
85+
ComposeController({super.text});
86+
8587
int get maxLengthUnicodeCodePoints;
8688

8789
String get textNormalized => _textNormalized;
@@ -143,7 +145,7 @@ enum TopicValidationError {
143145
}
144146

145147
class ComposeTopicController extends ComposeController<TopicValidationError> {
146-
ComposeTopicController({required this.store}) {
148+
ComposeTopicController({super.text, required this.store}) {
147149
_update();
148150
}
149151

@@ -226,7 +228,7 @@ enum ContentValidationError {
226228
}
227229

228230
class ComposeContentController extends ComposeController<ContentValidationError> {
229-
ComposeContentController() {
231+
ComposeContentController({super.text}) {
230232
_update();
231233
}
232234

0 commit comments

Comments
 (0)