setState function
small function to always check if mounted before running setState()
Implementation
void setState(
bool mounted,
void Function(Function()) setState,
void Function() fn,
) {
if (mounted) {
setState.call(fn);
}
}
small function to always check if mounted before running setState()
void setState(
bool mounted,
void Function(Function()) setState,
void Function() fn,
) {
if (mounted) {
setState.call(fn);
}
}