Skip to main content

offline_courier 0.2.1 copy "offline_courier: ^0.2.1" to clipboard
offline_courier: ^0.2.1 copied to clipboard

Offline-first HTTP outbox for Flutter: persists requests in native SQLite and replays them with backoff when the network returns, even after the app is killed. Zero dependencies.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:offline_courier/offline_courier.dart';

import 'example_app.dart';

/// Top-level and annotated so the background engine can rebuild the same
/// configuration after the app has been killed.
@pragma('vm:entry-point')
CourierConfig buildCourierConfig() => const CourierConfig(
  retryPolicy: RetryPolicy(maxAttempts: 8, maxAge: Duration(days: 3)),
);

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await OfflineCourier.initialize(config: buildCourierConfig);
  runApp(const ExampleApp());
}
1
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publisherteam17apps.link

Weekly Downloads

Offline-first HTTP outbox for Flutter: persists requests in native SQLite and replays them with backoff when the network returns, even after the app is killed. Zero dependencies.

Repository (GitHub)
View/report issues

Topics

#offline #sync #http #background

License

MIT (license)

Dependencies

flutter

More

Packages that depend on offline_courier

Packages that implement offline_courier