isLoading property

bool isLoading

The isLoading bool defaults to false but will show as true when awaiting the futureToRun function to complete. Once completed, this will simply toggle back to false.

This can be used easily within your UI to create a loading state.

Column(
  children: [
    if (controller.isBusy)
      const CircularProgressIndicator.adaptive()
    else if (controller.hasError)
      Text(controller.error!)
    else
      const Text('Content'),
  ],
),

Implementation

bool get isLoading => _isLoading;