setLoading method

void setLoading(
  1. bool loading
)

Sets the loading state and notifies listeners if it changes.

Implementation

void setLoading(bool loading) {
  if (_isLoading != loading) {
    _isLoading = loading;
    notifyListeners();
  }
}