mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make FormField._validate() return void (#30644)
None of its callers were using the return value, so no need to invoke the `isValid` getter unnecessarily.
This commit is contained in:
parent
535523dbe0
commit
cb78274c3f
@ -365,10 +365,9 @@ class FormFieldState<T> extends State<FormField<T>> {
|
||||
return !hasError;
|
||||
}
|
||||
|
||||
bool _validate() {
|
||||
void _validate() {
|
||||
if (widget.validator != null)
|
||||
_errorText = widget.validator(_value);
|
||||
return !hasError;
|
||||
}
|
||||
|
||||
/// Updates this field's state to the new value. Useful for responding to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user