From cb78274c3ff088d9a5cdabb45439de829e5aa597 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Sun, 7 Apr 2019 21:01:33 -0700 Subject: [PATCH] Make FormField._validate() return void (#30644) None of its callers were using the return value, so no need to invoke the `isValid` getter unnecessarily. --- packages/flutter/lib/src/widgets/form.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/form.dart b/packages/flutter/lib/src/widgets/form.dart index 0c736f576c..4c3b120387 100644 --- a/packages/flutter/lib/src/widgets/form.dart +++ b/packages/flutter/lib/src/widgets/form.dart @@ -365,10 +365,9 @@ class FormFieldState extends State> { 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