Unverified Commit a42aa048 authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Remove duplicate setState in TextFormFieldState.reset (#69062)

Small performance optimization by removing a duplicate setState call.
parent cd294666
...@@ -359,10 +359,10 @@ class _TextFormFieldState extends FormFieldState<String> { ...@@ -359,10 +359,10 @@ class _TextFormFieldState extends FormFieldState<String> {
@override @override
void reset() { void reset() {
// setState will be called in the superclass, so even though state is being
// manipulated, no setState call is needed here.
_effectiveController!.text = widget.initialValue ?? '';
super.reset(); super.reset();
setState(() {
_effectiveController!.text = widget.initialValue ?? '';
});
} }
void _handleControllerChanged() { void _handleControllerChanged() {
......
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