offline_sync_cache 1.0.0 copy "offline_sync_cache: ^1.0.0" to clipboard
offline_sync_cache: ^1.0.0 copied to clipboard

A simple offline-first caching utility for Dart & Flutter apps.

example/main.dart

import 'package:offline_sync_cache/offline_sync_cache.dart';

void main() async {
  final cache = SmartCache();

  final data = await cache.read<Map<String, dynamic>>('user', fetcher: () async {
    print('Fetching from API...');
    await Future.delayed(const Duration(seconds: 1));
    return {'name': 'Nget Sophun', 'age': 25};
  });

  print('✅ Cached data: $data');

  final again = await cache.read<Map<String, dynamic>>('user');
  print('From memory: $again');
}
1
likes
160
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple offline-first caching utility for Dart & Flutter apps.

Homepage

License

MIT (license)

Dependencies

flutter, path, path_provider

More

Packages that depend on offline_sync_cache