set_cache 1.0.1
set_cache: ^1.0.1 copied to clipboard
SetCache Efficient data caching package for pub.dev, optimizing performance and reducing network calls. Boost your app's speed!
import 'package:flutter/material.dart';
import 'package:set_cache/set_cache.dart';
void main() {
// maxAge: days
// init() must be called before using save() and get()
SetCache.instance.init(maxAge: 7);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Set Cache Example';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
// home: const MyStatefulWidget(),
);
}
}