refreshView method
refresh the page view only if widget is mounted use force to force refresh even if widget is alreay mounted
Implementation
void refreshView({bool? force, void Function()? fn}) {
if (!mounted || (force != null && !force)) {
return;
}
setState(fn ?? () {});
}