@@ -83,7 +83,7 @@ const double _composeButtonSize = 44;
83
83
///
84
84
/// Subclasses must ensure that [_update] is called in all exposed constructors.
85
85
abstract class ComposeController <ErrorT > extends TextEditingController {
86
- int ? get maxLengthUnicodeCodePoints;
86
+ int get maxLengthUnicodeCodePoints;
87
87
88
88
String get textNormalized => _textNormalized;
89
89
late String _textNormalized;
@@ -104,8 +104,7 @@ abstract class ComposeController<ErrorT> extends TextEditingController {
104
104
@visibleForTesting
105
105
int ? get debugLengthUnicodeCodePointsIfLong => _lengthUnicodeCodePointsIfLong;
106
106
int ? _computeLengthUnicodeCodePointsIfLong () =>
107
- maxLengthUnicodeCodePoints != null
108
- && _textNormalized.length > maxLengthUnicodeCodePoints!
107
+ _textNormalized.length > maxLengthUnicodeCodePoints
109
108
? _textNormalized.runes.length
110
109
: null ;
111
110
@@ -155,7 +154,7 @@ class ComposeTopicController extends ComposeController<TopicValidationError> {
155
154
bool get mandatory => store.realmMandatoryTopics;
156
155
157
156
// TODO(#307) use `max_topic_length` instead of hardcoded limit
158
- @override final int maxLengthUnicodeCodePoints = kMaxTopicLengthCodePoints;
157
+ @override final maxLengthUnicodeCodePoints = kMaxTopicLengthCodePoints;
159
158
160
159
@override
161
160
String _computeTextNormalized () {
@@ -216,7 +215,7 @@ class ComposeContentController extends ComposeController<ContentValidationError>
216
215
}
217
216
218
217
// TODO(#1237) use `max_message_length` instead of hardcoded limit
219
- @override final int maxLengthUnicodeCodePoints = kMaxMessageLengthCodePoints;
218
+ @override final maxLengthUnicodeCodePoints = kMaxMessageLengthCodePoints;
220
219
221
220
int _nextQuoteAndReplyTag = 0 ;
222
221
int _nextUploadTag = 0 ;
0 commit comments