ifBusy method Null safety
Can be used to conditionally show another widget if the viewModel is busy running a long running task.
If the view model is busy, it will show the busyIndicator widget. If it is not
busy, it will show the otherwise widget.
Implementation
Widget ifBusy(Widget busyIndicator, {required Widget otherwise}) {
return isBusy ? busyIndicator : otherwise;
}