Commit d1e89522 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Assert that required params are non-null (TextInput) (#9860)

parent 274205c1
...@@ -47,7 +47,7 @@ class TextInputConfiguration { ...@@ -47,7 +47,7 @@ class TextInputConfiguration {
const TextInputConfiguration({ const TextInputConfiguration({
this.inputType: TextInputType.text, this.inputType: TextInputType.text,
this.actionLabel, this.actionLabel,
}); }) : assert(inputType != null);
/// The type of information for which to optimize the text input control. /// The type of information for which to optimize the text input control.
final TextInputType inputType; final TextInputType inputType;
...@@ -87,7 +87,9 @@ class TextEditingValue { ...@@ -87,7 +87,9 @@ class TextEditingValue {
this.text: '', this.text: '',
this.selection: const TextSelection.collapsed(offset: -1), this.selection: const TextSelection.collapsed(offset: -1),
this.composing: TextRange.empty this.composing: TextRange.empty
}); }) : assert(text != null),
assert(selection != null),
assert(composing != null);
/// Creates an instance of this class from a JSON object. /// Creates an instance of this class from a JSON object.
factory TextEditingValue.fromJSON(Map<String, dynamic> encoded) { factory TextEditingValue.fromJSON(Map<String, dynamic> encoded) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment