setState method
state change can rebuild the widget tree, which can lead to DSL rebuild. Usually this can cost several milliseconds depend on the complexity of DSL.
Implementation
@override
void setState(VoidCallback fn) {
if (_state == null || !_state!.mounted) return;
// ignore: invalid_use_of_protected_member
_state?.setState(fn);
_state?._reload();
}