flutter_loader

Last updated:

0 purchases

flutter_loader Image
flutter_loader Images
Add to Cart

Description:

flutter loader

flutter_loader #

A Flutter package for simplifying resource loading.
Getting Started #
Import the library with
import 'package:flutter_loader/flutter_loader.dart';
copied to clipboard
Then you can build a UI for loading resource with
LoaderBuilder(
loader: () async {
await _loadResourceAsync();
},
builder: (context, controller, widget) {
return _buildContent(context, controller, widget);
}
)
copied to clipboard
Or use DefaultLoaderBuilder with default UI implementation:
DefaultLoaderBuilder(
loader: () => _loadResourceAsync(),
)
copied to clipboard
DefaulLoaderBuilder offers UI for the full lifecycle of the loader:

init: show loading indicator
loading: show loading indicator
error: show an error message and a button for retrying
loaded: show a text message displaying the loaded data

You can optional provide initBuilder, loadingBuilder, errorBuilder, loadedBuilder to
customize the UI for each of the above states. You can also customize the style of
DefaultLoaderBuilder by providing DefaultLoaderThemeData via themeData.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.