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
|
@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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user