Skip to content
pubscout

universal_image

1.0.12, released 7 months ago by an unverified publisher

Unified widget to display any image source (asset, network, file, SVG, base64, bytes, icon) across platforms.

WASM-ready
$ flutter pub add universal_image
Source repository

What it does

UniversalImage abstracts over different image types and providers, handling format detection, caching and rendering. It integrates flutter_svg for SVGs and extended_image for caching and advanced features.

AI-written summary of version 1.0.12, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a single widget to handle multiple image sources without manual type checks
  • Cross‑platform apps (mobile, web, desktop) require consistent image handling
  • You want built‑in caching and optional SVG support

Skip it when

  • You only need simple network images and prefer a lightweight solution
  • Fine‑grained control over caching policies is required beyond what extended_image offers

Strengths

  • Supports many formats (JPEG, PNG, GIF, WebP, SVG, base64, bytes, icons)
  • Works on all Flutter platforms including web WASM
  • Leverages extended_image caching and flutter_svg rendering
  • Simple API – just pass the source

Weaknesses

  • Adds extra dependencies (flutter_svg, extended_image) increasing bundle size
  • Limited customization compared to using extended_image directly
  • Documentation is limited to basic examples

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
var img = UniversalImage('https://example.com/pic.png', width:100, height:100, fit:BoxFit.cover);

Alternatives

Packages that do the same job and could replace universal_image.

Works with

Packages commonly used together with universal_image: ones it builds on, ones built on it, and its own family.