flutter_swr 0.2.0 copy "flutter_swr: ^0.2.0" to clipboard
flutter_swr: ^0.2.0 copied to clipboard

A Flutter Hooks port of SWR: cache-then-revalidate data fetching with dedup, retry, polling, and app-resume revalidation.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_swr_example/src/cache/sqflite_swr_cache.dart';
import 'package:flutter_swr_example/src/cache/swr_model.dart';

import 'src/app.dart';
import 'src/models/product.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final cache = await SqfliteSwrCache.open(
    fromJson: {...swrModel<Product>(Product.fromJson)},
  );

  runApp(StoreApp(cache: cache));
}
1
likes
0
points
197
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter Hooks port of SWR: cache-then-revalidate data fetching with dedup, retry, polling, and app-resume revalidation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, flutter, flutter_hooks

More

Packages that depend on flutter_swr