disposable_cached_images 1.0.6 copy "disposable_cached_images: ^1.0.6" to clipboard
disposable_cached_images: ^1.0.6 copied to clipboard

retractedoutdated

A flutter package for displaying and releasing images from memory.

example/example.md

Open full example in github

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

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  runAppWithDisposableCachedImage(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: GridView.builder(
          // RepaintBoundaries is enabled by default in DisposableCachedImage widget
          addRepaintBoundaries: false,
          padding: const EdgeInsets.all(20),
          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 2,
            mainAxisSpacing: 20,
            crossAxisSpacing: 20,
          ),
          itemCount: images.length,
          itemBuilder: (context, index) => DisposableCachedImage.network(imageUrl: images[index]),
        ),
      ),
    );
  }

  static final images = List.generate(
    500,
    (final i) => 'https://picsum.photos/id/$i/200/300',
  );
}

37
likes
0
pub points
86%
popularity

Publisher

unverified uploader

A flutter package for displaying and releasing images from memory.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_riverpod, http, path_provider

More

Packages that depend on disposable_cached_images