Future<void> withLoading(Future<void> Function() task) async { isLoading.value = true; try { await task(); } finally { isLoading.value = false; } }