taro library
Classes
- Taro
- Taro is a library for loading images. It uses two loaders: Storage and Network.
- TaroHttpClient
- TaroHttpClient is an interface class for GET requests to the specified URL.
- TaroImage
- TaroImage is an ImageProvider that loads images from the network and caches them.
- TaroLoaderNetwork
- TaroLoaderNetwork is a class that manages the loading of data from a network source. It uses the http package to send GET requests to the provided URL.
- TaroLoaderStorage
- The TaroLoaderStorage class is used to load and save data from storage.
- TaroResizeOption
-
The TaroResizeOption is used to determine how images are resized and saved.
Please refer to
https://pub.dev/packages/image
for supported formats. - TaroResizeOptionDisk
- TaroResizeOptionMemory
- The image is resized in memory, saved original size and format.
- TaroResizeOptionSkip
- The image is not resized, saved original size and format.
- TaroResizer
- The TaroResizer class is used to resize images.
- TaroWidget
- TaroWidget is a widget for loading images. It uses two loaders: Storage and Network. Images that have been loaded once are cached in ImageCache.
Enums
Typedefs
- TaroErrorBuilder = Widget Function(BuildContext context, String url, Object error, StackTrace? stackTrace)
- A builder that creates a widget when an error occurs while loading the data.
- TaroHeaderOption = ({bool checkMaxAgeIfExist, bool ifThrowMaxAgeHeaderError})
- TaroHeaderOption is used to configure the options for a header request.
-
TaroHttpResponse
= ({Uint8List bodyBytes, int? contentLength, Map<
String, String> headers, bool isRedirect, String? reasonPhrase, int statusCode}) - TaroHttpResponse is a class that holds the necessary response information.
- TaroPlaceholderBuilder = Widget Function(BuildContext context, String url)
- A builder that creates a placeholder widget while the data is loading.
Exceptions / Errors
- TaroCacheControlException
- TaroCacheControlException is thrown when there is an issue with the cache-control header in the Taro library. It includes the cache-control header and the original exception that caused the error. This exception is thrown when the status code is in the range 200-399.
- TaroEmptyResponseException
- TaroEmptyResponseException is thrown when there is an issue with the HTTP response in the Taro library. It includes the URL that was being accessed. This exception is thrown when the response body is empty.
- TaroException
- TaroException is a base class for all exceptions in the Taro.
- TaroHttpResponseException
- TaroHttpResponseException is thrown when there is an issue with the HTTP response in the Taro library. It includes the status code, reason phrase, content length, headers, and whether the response is a redirect. This exception is thrown when the status code is not in the range 200-399.
- TaroLoadException
- TaroLoadException is thrown when there is an issue with loading data in the Taro library.
- TaroNetworkException
- TaroNetworkException is thrown when there is an issue with network operations in the Taro library. It includes the URL that was being accessed and the original error that caused the issue.
- TaroResizeException
- TaroResizeException is thrown when there is an issue with resizing an image in the Taro library. It includes the original exception that caused the error.
- TaroResizeFailedException
- TaroResizeFailedException is thrown when there is an issue with resizing an image in the Taro library.
- TaroStorageException
- TaroStorageException is thrown when there is an issue with storage operations in the Taro library. It includes the original exception that caused the error.
- TaroUriParseException
- TaroUriParseException is thrown when there is an issue with parsing a URI in the Taro library. It includes the URL that was being parsed.