feedjar_sdk 0.1.0
feedjar_sdk: ^0.1.0 copied to clipboard
FeedJar SDK for Flutter — configure, submit, and list in-app feedback (parity with iOS FeedJarKit).
FeedJarKit for Flutter (feedjar_sdk) #
Dart / Flutter package aligned with FeedJarKit iOS and Android: same POST / GET /ingest/feedback endpoints, fjr_ API keys, Authorization + X-FeedJar-Key, and support-email validation.
API-first: no built-in modal (compose your own UI and call FeedJar.submit).
Install #
From pub.dev:
dependencies:
feedjar_sdk: ^0.1.0
flutter pub get
Local path dependency while developing:
dependencies:
feedjar_sdk:
path: ../feedjar-sdk-flutter
Usage #
import 'package:feedjar_sdk/feedjar_sdk.dart';
void main() {
FeedJar.configure('fjr_...'); // optional baseUrl for self-hosted stacks
// async e.g. from a button:
await FeedJar.submit(
type: FeedbackType.featureRequest,
message: 'Tablet layout',
email: 'user@example.com',
metadata: {'screen': 'home', 'appVersion': '2.1.0'},
);
final list = await FeedJar.listFeedback(limit: 20);
for (final item in list.feedback) {
print(item.message);
}
}
Android emulator against a local API:
FeedJar.configure('fjr_...', baseUrl: 'http://10.0.2.2:3007');
Defaults #
- API:
https://api.feedjar.in - Auth:
Authorization: Bearer <key>andX-FeedJar-Key
Example app #
cd example
flutter pub get
flutter run
Set your API key in example/lib/main.dart before submitting.
Tests #
flutter test
dart analyze
Publish to pub.dev #
-
Create a pub.dev account and sign in with Google.
-
Run a dry run locally:
dart pub publish --dry-run -
Authenticate once on your machine:
dart pub login -
Publish:
dart pub publishConfirm the prompt. Use
--forceonly in CI. -
Tag a release to publish via GitHub Actions:
git tag v0.1.0 git push origin v0.1.0Add a repo secret named
PUB_CREDENTIALScontaining the JSON from~/.config/dart/pub-credentials.jsonafterdart pub login.
Layout #
feedjar-sdk-flutter/
├── pubspec.yaml
├── README.md
├── CHANGELOG.md
├── LICENSE
├── lib/
│ ├── feedjar_sdk.dart
│ └── src/
│ ├── feedjar.dart
│ ├── feedjar_error.dart
│ └── models.dart
├── example/
└── test/
License #
MIT