Skip to main content

cache_nexus 1.1.0 copy "cache_nexus: ^1.1.0" to clipboard
cache_nexus: ^1.1.0 copied to clipboard

Offline-first caching for Flutter. Memory + Hive tiers, TTL, 5 cache policies, typed adapters, AES-GCM encryption, per-user isolation, reactive streams and offline sync.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:cache_nexus/cache_nexus.dart';
import 'services/cache_service.dart';
import 'screens/home_screen.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final cacheService = await CacheService.create();
  runApp(CacheNexusApp(cacheService: cacheService));
}

class CacheNexusApp extends StatelessWidget {
  final CacheService cacheService;

  const CacheNexusApp({super.key, required this.cacheService});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Cache Nexus Demo',
      theme: ThemeData(
        colorSchemeSeed: const Color(0xFF6750A4),
        useMaterial3: true,
      ),
      debugShowCheckedModeBanner: false,
      // The overlay works here even though no Navigator is above it.
      builder: (context, child) =>
          CacheNexusOverlay(manager: cacheService.cache, child: child!),
      home: HomeScreen(cacheService: cacheService),
    );
  }
}
1
likes
150
points
813
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Offline-first caching for Flutter. Memory + Hive tiers, TTL, 5 cache policies, typed adapters, AES-GCM encryption, per-user isolation, reactive streams and offline sync.

Repository (GitHub)
View/report issues
Contributing

Topics

#cache #offline #hive #flutter #dio

License

MIT (license)

Dependencies

archive, connectivity_plus, crypto, dio, flutter, hive_ce, hive_ce_flutter, pointycastle

More

Packages that depend on cache_nexus