Function to check if loading is occurring.
final bool Function(BuildContext context, S state)? isLoading;