setLoading method

void setLoading(
  1. bool isLoading
)

Sets the loading state of the widget. Notifies listeners after updating the state.

Implementation

void setLoading(bool isLoading) {
  this.isLoading = isLoading;
  notifyListeners();
}