Skip to main content

fuery 0.8.3 copy "fuery: ^0.8.3" to clipboard
fuery: ^0.8.3 copied to clipboard

Server data caching for Flutter: cache API responses, refetch in the background, paginate, mutate with optimistic updates, and keep data across restarts.

example/lib/main.dart

import 'package:example/app/app.dart';
import 'package:example/app/data/preferences_storage.dart';
import 'package:flutter/material.dart';
import 'package:fuery/fuery.dart';
import 'package:shared_preferences/shared_preferences.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Queries with `persist` are stored here, so the todo list is on screen
  // before the first request finishes.
  final preferences = await SharedPreferencesWithCache.create(
    cacheOptions: const SharedPreferencesWithCacheOptions(),
  );
  Fuery.client = QueryClient(storage: PreferencesStorage(preferences));

  runApp(const TodoApp());
}
2
likes
0
points
1.28k
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Server data caching for Flutter: cache API responses, refetch in the background, paginate, mutate with optimistic updates, and keep data across restarts.

Homepage
Repository (GitHub)
View/report issues

Topics

#state-management #server-state #cache #caching #offline

License

unknown (license)

Dependencies

flutter, fuery_core

More

Packages that depend on fuery