f_cache 3.1.0 copy "f_cache: ^3.1.0" to clipboard
f_cache: ^3.1.0 copied to clipboard

retractedoutdated

Generic cache manager for flutter. Saves files and infos on the tmp storages of the device.

example/lib/main.dart

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

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Image(image: CachedNetworkImage('https://lmg.jj20.com/up/allimg/4k/s/02/210924233115O14-0-lp.jpg', meta: {'aaabbb': 123, 'cccddd': 'test'})),
          ],
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
2
likes
0
points
96
downloads

Publisher

unverified uploader

Weekly Downloads

Generic cache manager for flutter. Saves files and infos on the tmp storages of the device.

Repository

License

unknown (license)

Dependencies

crypto, flutter, http, path, path_provider

More

Packages that depend on f_cache