Skip to main content
Sharpnado.TaskLoaderView package icon

Sharpnado.TaskLoaderView

Free yourself from IsBusy=true! The `TaskLoaderView` is a UI component that handles all your UI loading state (Loading, Error, Result, Notification), and removes all the pain of async loading from your view models (try catch / async void / IsBusy / HasErrors / base view models / ...) thanks to its brother the `TaskLoaderNotifier`. BREAKING CHANGE Version 2.4.0: The task source given to to TaskLoaderNotifier is now a Func{bool, Task} (or a Func{bool, Task{T}}) instead of a Func{Task}. You can simply change your calls from Loader.Load(() => InitializeAsync()) to Loader.Load(_ => InitializeAsync()) to ignore it if you like. The boolean that is passed now to your task source is a boolean indicating if the notifier is refreshing. You can use it for invalidating your cache, for example: public Task LoadItems(bool isRefreshing) { if (isRefreshing || !_cache.ContainsItems()) { _cache.InvalidateItems(); var items = _httpService.GetItems() _cache.PutItems(items); return items; } return _cache.GetItems(); } Featuring: * Default views for all loading states (Loading, Error, Success, Notification, Refresh) * Snackbar component * Compose notifiers with CompositeTaskLoaderNotifier * Stylable views including fonts, accent color, error images, ... * Any states are overridable with user custom views and easily positionned with AbsoluteLayout properties * Support for Xamarin.Forms.Skeleton nuget package * Support for refresh scenarios, and error while refreshing with the ErrorNotificationView * Supports Async mvvm ICommand through TaskLoaderCommand * Supports loading task on demand with the NotStarted state * TaskLoaderNotifier for the ViewModel side taking care of all the error handling and the IsBusy nonsense

Total Downloads
269.9K
269,854
Published
Jun 23, 2021
Latest stable version

Install

.NET CLI
dotnet add package Sharpnado.TaskLoaderView --version 2.4.0
Package Manager Console
Install-Package Sharpnado.TaskLoaderView -Version 2.4.0
PackageReference
<PackageReference Include="Sharpnado.TaskLoaderView" Version="2.4.0" />

Frameworks

.NETStandard2.0

Dependencies

Sharpnado.TaskMonitor
.NETStandard2.0
[1.0.2, )
Xamarin.Forms
.NETStandard2.0
[5.0.0.2012, )

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.