image_cacheing 0.0.2 copy "image_cacheing: ^0.0.2" to clipboard
image_cacheing: ^0.0.2 copied to clipboard

image_cacheing will cache image that given to url params. Thus increasing the speed of image loading at next time you load the image. This is support on android devices as of now.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:image_cacheing/image_cacheing.dart';
import './global/vars.dart' as global;

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
    );
  }
}

// ? example of the image cacheing
class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Column(
          children: [
            // * normal Image cache
            Container(child: ImageCacheing(url: global.imageUrl)),
            // * image cache with loading
            // ? who can pass any type widget to show on loading widgets
            Container(
                child: ImageCacheing(
                    url: global.imageLoadingUrl,
                    loadingWidget: Center(child: CircularProgressIndicator()))),
            // * image cache with warning
            // ? who can pass any type widget to show on error widgets
            Container(
                child: ImageCacheing(
                    url: global.imageErrorUrl,
                    errorWidget: Center(child: Icon(Icons.warning)))),
          ],
        ),
      ),
    );
  }
}
7
likes
120
pub points
68%
popularity

Publisher

unverified uploader

image_cacheing will cache image that given to url params. Thus increasing the speed of image loading at next time you load the image. This is support on android devices as of now.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

convert, crypto, flutter, path, path_provider

More

Packages that depend on image_cacheing