Remove duplicate setState in TextFormFieldState.reset (#69062)
Small performance optimization by removing a duplicate setState call.
This commit is contained in:
parent
cd294666bf
commit
a42aa04826
@ -359,10 +359,10 @@ class _TextFormFieldState extends FormFieldState<String> {
|
||||
|
||||
@override
|
||||
void reset() {
|
||||
super.reset();
|
||||
setState(() {
|
||||
// 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();
|
||||
}
|
||||
|
||||
void _handleControllerChanged() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user