setLoading method
Transitions the notifier to the loading state.
Use this when starting an async operation to indicate that the data is being fetched.
Example:
void fetchData() {
setLoading();
// Perform async operation...
}
Implementation
@protected
void setLoading() => setState(state.toLoading(), forced: true);