setState method
Combine all setState calls within the same tick into single one. This also makes the setState opearation async.
Implementation
@override
void setState(VoidCallback fn) {
if (_fns.isEmpty) {
Future.microtask(() {
if (mounted) {
super.setState(_runFns);
}
});
}
_fns.add(fn);
}