rxcache_network_image 0.0.1 copy "rxcache_network_image: ^0.0.1" to clipboard
rxcache_network_image: ^0.0.1 copied to clipboard

Easy download image from network and show in widget with rxcacheNetworkImage fast load image from network

Features #

  • Cache Image in disk
  • Cache Image in memory
  • Preload image in RxCacheManager

Getting started #

rxcache_network_image: 0.0.1

Usage #

RxImage.cacheNetwork(
url: urls[index],
);

Example #

class _MyHomePageState extends State<MyHomePage> {
  final cacheManager = RxCacheManager();
  @override
  void initState() {
    ///preload and cache disk
    for (final url in urls) {
      cacheManager.download(url: url).then((value) => null);
    }
    super.initState();
  }

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          Expanded(
              child: ListView.builder(
                itemCount: urls.length,
                itemBuilder: (context, index) {
                  return RxImage.cacheNetwork(
                    url: urls[index],
                  );
                },
              ))
        ],
      ),
    );
  }
}

Preview #

Example Video App
4
likes
0
pub points
72%
popularity

Publisher

unverified uploader

Easy download image from network and show in widget with rxcacheNetworkImage fast load image from network

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, path_provider

More

Packages that depend on rxcache_network_image