cached_any_image 0.1.1 copy "cached_any_image: ^0.1.1" to clipboard
cached_any_image: ^0.1.1 copied to clipboard

A cache-aware Flutter widget that renders both raster images and SVGs from a single API.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:cached_any_image/cached_any_image.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'cached_any_image demo',
      home: Scaffold(
        appBar: AppBar(title: const Text('CachedAnyImage Demo')),
        body: ListView(
          padding: const EdgeInsets.all(16),
          children: const [
            Text('SVG (via URL):'),
            SizedBox(height: 8),
            CachedAnyImage(
              url:
                  'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg',
              width: 120,
              height: 120,
              fit: BoxFit.contain,
            ),
            SizedBox(height: 24),
            Text('Raster (via URL):'),
            SizedBox(height: 8),
            CachedAnyImage(
              url: 'https://picsum.photos/600/300',
              height: 160,
              fit: BoxFit.cover,
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
145
points
16
downloads

Publisher

verified publisherkator.dev

Weekly Downloads

A cache-aware Flutter widget that renders both raster images and SVGs from a single API.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #cached-network-image #flutter-svg #flutter-cache-manager

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter, flutter_cache_manager, flutter_svg

More

Packages that depend on cached_any_image