cached_network

Creator: coderz1093

Last updated:

0 purchases

cached_network Image
cached_network Images

Languages

Categories

Add to Cart

Description:

cached network

Cached Network #
This is a package use to fetch data from web and write as string into cache directory. If the cache file exists, then will read data from cache file instead of web.
Besides, it provides a widget use to view caches.
Install #
flutter pub add cached_network
copied to clipboard
Getting started #
CachedNetwork
import 'package:cached_network/cached_network.dart';

void main() async {
var network = CachedNetwork();
await network.request('https://google.com');
}
copied to clipboard
CacheView
import 'package:cached_network/cached_network.dart';
import 'package:flutter/material.dart';

void main() {
runApp(const MaterialApp(
home: CacheViewDemo(),
));
}

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

@override
Widget build(BuildContext context) {
return const CacheView();
}
}
copied to clipboard
Important #
If you use CachedNetwork not in flutter or in isolate, you should specify the cacheDirectory when you construct the instance.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.