cacheman 0.2.0
cacheman: ^0.2.0 copied to clipboard
A tiny, type-safe wrapper over get_storage (persistent) with one unified API: TTL & absolute expiry, sliding renewal, namespaces, pluggable serialization, an optional codec hook, and a key-bound short [...]
example/lib/main.dart
import 'package:cacheman/cacheman.dart';
import 'package:flutter/material.dart';
import 'demo_shell.dart';
late Cacheman cache;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
cache = await Cacheman.create();
runApp(const CachemanDemoApp());
}
class CachemanDemoApp extends StatelessWidget {
const CachemanDemoApp({super.key});
@override
Widget build(BuildContext context) => MaterialApp(
title: 'cacheman demo',
theme: ThemeData(colorSchemeSeed: Colors.teal, useMaterial3: true),
home: const DemoShell(),
);
}