Assert that required params are non-null (TextInput) (#9860)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user