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

This commit is contained in:
Chris Bracken
2017-05-05 21:44:46 -07:00
committed by GitHub
parent 274205c1b5
commit d1e895224e

View File

@@ -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<String, dynamic> encoded) {