publishable_core 0.0.7 copy "publishable_core: ^0.0.7" to clipboard
publishable_core: ^0.0.7 copied to clipboard

Framework-agnostic, minimal dependencies, and pure Dart package for implementing Publishable in your app.

publishable_core #

Package Publisher MIT License LeanCode Style

publishable_core is a pure Dart package that allows you to send data from your project directly to the Publishable console.

Status Comments
Tests (stable) Current stable Flutter version
Tests (beta) Current beta Flutter version
Tests (3.24.0) The oldest supported Flutter version

Getting started #

  1. Add this package to your dependencies.
dependencies:
  publishable_core: latest_version
  1. Get the dependencies.
dart pub get
  1. Create a new instance with your API key and PublishableIdentity.
final publishable = Publishable(
  // TODO: Replace with your Publishable API key.
  token: 'xxxx-xxxx-xxxx-xxxx',
  // TODO: Fill user's data.
  identity: PublishableIdentity(
    // ...
  ),
);

Usage #

The library doesn't include any opinionated dependency injection solution or third-party dependencies, and is intended for use for advanced users.

Note

If you want to use Publishable in Flutter with as little effort as possible, consider using package:publishable instead. It creates PublishableIdentity for you, and allows you to get Publishable from context.

import 'package:publishable_core/publishable_core.dart';

Future<void> main() async {
  final publishable = Publishable(
    // TODO: Replace with your Publishable API key.
    token: 'xxxx-xxxx-xxxx-xxxx',
    // TODO: Replace with user's data (or use `publishable` package instead).
    // See more: https://pub.dev/packages/publishable
    identity: PublishableIdentity(
      id: const IdData(
        uuid: 'xxxx-xxxx-xxxx-xxxx',
      ),
      app: AppData(
        platform: AppPlatform.current,
        libVersion: Publishable.libVersion,
        version: '1.0.0',
        build: 1,
        store: 'Huawei AppGallery',
      ),
      device: const DeviceData(
        model: 'Pixel 5',
        osVersion: '12',
        locale: 'en_US',
      ),
    ),
  );

  // Submit user's feedback.
  await publishable.sendFeedback(
    'Awesome!',
    // ⬇️ A screenshot ⬇️
    // attachment: UInt8List,
    // ⬇️ Extra data ⬇️
    // properties: Map<String, dynamic>,
  );
}

Additional information #

  • This package requires at least Dart 3.5 to work.
  • If there are any issues feel free to go to GitHub Issues and report a bug.
0
likes
0
points
89
downloads

Publisher

verified publisherpublishable.app

Weekly Downloads

Framework-agnostic, minimal dependencies, and pure Dart package for implementing Publishable in your app.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dart_mappable, http, logging, meta

More

Packages that depend on publishable_core