diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart index 6a3d411a27..6189235968 100644 --- a/packages/flutter/lib/src/services/text_input.dart +++ b/packages/flutter/lib/src/services/text_input.dart @@ -47,7 +47,7 @@ class TextInputConfiguration { const TextInputConfiguration({ this.inputType: TextInputType.text, this.actionLabel, - }); + }) : assert(inputType != null); /// The type of information for which to optimize the text input control. final TextInputType inputType; @@ -87,7 +87,9 @@ class TextEditingValue { this.text: '', this.selection: const TextSelection.collapsed(offset: -1), this.composing: TextRange.empty - }); + }) : assert(text != null), + assert(selection != null), + assert(composing != null); /// Creates an instance of this class from a JSON object. factory TextEditingValue.fromJSON(Map encoded) {