icon/image_widgets library

Constants

kDefaultImageSize → const double
The default image size

Functions

imageProviderOf(dynamic source, {bool useHttpGetForWeb = true, void errorCallback()?}) ImageProvider<Object>?
Loads based on a URL, file, etc - if the url starts with assets:// then the image is loaded from assets. Also, if the image is from the sunny api server, it will attach the auth header if it's present.
imageWidgetOf(BuildContext context, dynamic imageSource, {Key? key, bool circle = true, double size = kDefaultImageSize, Widget? placeholder, Color? background, bool fallbackToPlaceholder = true, dynamic iconOverlay}) Widget?
Loads an image widget from a variety of known sources: Uri, String, File, bytes. The placeholder is only used when the imageSource is a network source (Uri, String). In that case, the placeholder is displayed while the image is loading.
precacheImageIfNetwork(dynamic imageUrl, BuildContext context) FutureOr