@@ -194,10 +194,10 @@ class CupertinoTextField extends StatefulWidget {
194194 /// must not be null.
195195 ///
196196 /// The [autocorrect] , [autofocus] , [clearButtonMode] , [dragStartBehavior] ,
197- /// [expands] , [maxLengthEnforced ] , [obscureText ] , [prefixMode ] , [readOnly ] ,
198- /// [scrollPadding ] , [suffixMode ] , [textAlign ] , [selectionHeightStyle ] ,
199- /// [selectionWidthStyle] , [ enableSuggestions] , and [enableIMEPersonalizedLearning]
200- /// properties must not be null.
197+ /// [expands] , [obscureText ] , [prefixMode ] , [readOnly ] , [scrollPadding ] ,
198+ /// [suffixMode ] , [textAlign ] , [selectionHeightStyle ] , [selectionWidthStyle ] ,
199+ /// [enableSuggestions] , and [enableIMEPersonalizedLearning] properties must
200+ /// not be null.
201201 ///
202202 /// See also:
203203 ///
@@ -244,12 +244,6 @@ class CupertinoTextField extends StatefulWidget {
244244 this .minLines,
245245 this .expands = false ,
246246 this .maxLength,
247- @Deprecated (
248- 'Use maxLengthEnforcement parameter which provides more specific '
249- 'behavior related to the maxLength limit. '
250- 'This feature was deprecated after v1.25.0-5.0.pre.' ,
251- )
252- this .maxLengthEnforced = true ,
253247 this .maxLengthEnforcement,
254248 this .onChanged,
255249 this .onEditingComplete,
@@ -284,11 +278,6 @@ class CupertinoTextField extends StatefulWidget {
284278 smartDashesType = smartDashesType ?? (obscureText ? SmartDashesType .disabled : SmartDashesType .enabled),
285279 smartQuotesType = smartQuotesType ?? (obscureText ? SmartQuotesType .disabled : SmartQuotesType .enabled),
286280 assert (enableSuggestions != null ),
287- assert (maxLengthEnforced != null ),
288- assert (
289- maxLengthEnforced || maxLengthEnforcement == null ,
290- 'maxLengthEnforced is deprecated, use only maxLengthEnforcement' ,
291- ),
292281 assert (scrollPadding != null ),
293282 assert (dragStartBehavior != null ),
294283 assert (selectionHeightStyle != null ),
@@ -370,9 +359,9 @@ class CupertinoTextField extends StatefulWidget {
370359 /// must not be null.
371360 ///
372361 /// The [autocorrect] , [autofocus] , [clearButtonMode] , [dragStartBehavior] ,
373- /// [expands] , [maxLengthEnforced ] , [obscureText ] , [prefixMode ] , [readOnly ] ,
374- /// [scrollPadding ] , [suffixMode ] , [textAlign ] , [selectionHeightStyle ] ,
375- /// [selectionWidthStyle] , and [enableSuggestions] properties must not be null.
362+ /// [expands] , [obscureText ] , [prefixMode ] , [readOnly ] , [scrollPadding ] ,
363+ /// [suffixMode ] , [textAlign ] , [selectionHeightStyle ] , [selectionWidthStyle ] ,
364+ /// and [enableSuggestions] properties must not be null.
376365 ///
377366 /// See also:
378367 ///
@@ -416,12 +405,6 @@ class CupertinoTextField extends StatefulWidget {
416405 this .minLines,
417406 this .expands = false ,
418407 this .maxLength,
419- @Deprecated (
420- 'Use maxLengthEnforcement parameter which provides more specific '
421- 'behavior related to the maxLength limit. '
422- 'This feature was deprecated after v1.25.0-5.0.pre.' ,
423- )
424- this .maxLengthEnforced = true ,
425408 this .maxLengthEnforcement,
426409 this .onChanged,
427410 this .onEditingComplete,
@@ -456,11 +439,6 @@ class CupertinoTextField extends StatefulWidget {
456439 smartDashesType = smartDashesType ?? (obscureText ? SmartDashesType .disabled : SmartDashesType .enabled),
457440 smartQuotesType = smartQuotesType ?? (obscureText ? SmartQuotesType .disabled : SmartQuotesType .enabled),
458441 assert (enableSuggestions != null ),
459- assert (maxLengthEnforced != null ),
460- assert (
461- maxLengthEnforced || maxLengthEnforcement == null ,
462- 'maxLengthEnforced is deprecated, use only maxLengthEnforcement' ,
463- ),
464442 assert (scrollPadding != null ),
465443 assert (dragStartBehavior != null ),
466444 assert (selectionHeightStyle != null ),
@@ -688,18 +666,6 @@ class CupertinoTextField extends StatefulWidget {
688666 /// {@macro flutter.services.lengthLimitingTextInputFormatter.maxLength}
689667 final int ? maxLength;
690668
691- /// If [maxLength] is set, [maxLengthEnforced] indicates whether or not to
692- /// enforce the limit.
693- ///
694- /// If true, prevents the field from allowing more than [maxLength]
695- /// characters.
696- @Deprecated (
697- 'Use maxLengthEnforcement parameter which provides more specific '
698- 'behavior related to the maxLength limit. '
699- 'This feature was deprecated after v1.25.0-5.0.pre.' ,
700- )
701- final bool maxLengthEnforced;
702-
703669 /// Determines how the [maxLength] limit should be enforced.
704670 ///
705671 /// If [MaxLengthEnforcement.none] is set, additional input beyond [maxLength]
@@ -838,7 +804,6 @@ class CupertinoTextField extends StatefulWidget {
838804 properties.add (IntProperty ('minLines' , minLines, defaultValue: null ));
839805 properties.add (DiagnosticsProperty <bool >('expands' , expands, defaultValue: false ));
840806 properties.add (IntProperty ('maxLength' , maxLength, defaultValue: null ));
841- properties.add (FlagProperty ('maxLengthEnforced' , value: maxLengthEnforced, ifTrue: 'max length enforced' ));
842807 properties.add (EnumProperty <MaxLengthEnforcement >('maxLengthEnforcement' , maxLengthEnforcement, defaultValue: null ));
843808 properties.add (DoubleProperty ('cursorWidth' , cursorWidth, defaultValue: 2.0 ));
844809 properties.add (DoubleProperty ('cursorHeight' , cursorHeight, defaultValue: null ));
@@ -1192,7 +1157,7 @@ class _CupertinoTextFieldState extends State<CupertinoTextField> with Restoratio
11921157 final Offset cursorOffset = Offset (_iOSHorizontalCursorOffsetPixels / MediaQuery .of (context).devicePixelRatio, 0 );
11931158 final List <TextInputFormatter > formatters = < TextInputFormatter > [
11941159 ...? widget.inputFormatters,
1195- if (widget.maxLength != null && widget.maxLengthEnforced )
1160+ if (widget.maxLength != null )
11961161 LengthLimitingTextInputFormatter (
11971162 widget.maxLength,
11981163 maxLengthEnforcement: _effectiveMaxLengthEnforcement,
0 commit comments