coffrify_flutter 0.9.0 copy "coffrify_flutter: ^0.9.0" to clipboard
coffrify_flutter: ^0.9.0 copied to clipboard

Flutter integration for the Coffrify SDK: secure API key storage, an InheritedWidget provider, and a ready-made transfer preview widget.

coffrify_flutter #

Flutter integration for the Coffrify Dart SDK, encrypted file transfer infrastructure.

Use the pure-Dart coffrify package directly for non-Flutter code. This companion adds Flutter-only helpers:

  • CoffrifyFlutter: a lazily-initialized singleton with optional secure storage of the API key via flutter_secure_storage.
  • CoffrifyProvider: an InheritedWidget that exposes a Coffrify instance to descendants (CoffrifyProvider.of(context)).
  • CoffrifyImage: a widget that resolves a transfer to its preview URL.

Install #

flutter pub add coffrify_flutter

Quickstart #

import 'package:coffrify_flutter/coffrify_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final coffrify = await CoffrifyFlutter.initialize(
    apiKey: 'cof_live_…',
    persistSecurely: true,
  );

  runApp(
    CoffrifyProvider(
      coffrify: coffrify.instance,
      child: const MyApp(),
    ),
  );
}

Then, anywhere in the tree:

final coffrify = CoffrifyProvider.of(context);
final transfers = await coffrify.transfers.list();

License #

MIT. See LICENSE.

0
likes
130
points
76
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Flutter integration for the Coffrify SDK: secure API key storage, an InheritedWidget provider, and a ready-made transfer preview widget.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

coffrify, flutter, flutter_secure_storage

More

Packages that depend on coffrify_flutter