Skip to main content

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

Offline-first outbox for Flutter. Persists failed HTTP requests and replays them with exponential backoff and jitter when the network returns, even after the app is killed. Zero dependencies: native J [...]

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
150
points
0
downloads

Documentation

API reference

Publisher

verified publisherteam17apps.link

Weekly Downloads

Offline-first outbox for Flutter. Persists failed HTTP requests and replays them with exponential backoff and jitter when the network returns, even after the app is killed. Zero dependencies: native JobScheduler, BGTaskScheduler, SQLite and network monitoring are built in.

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