Flutter
The FeedbackJar Flutter SDK lets you submit feedback and list public posts from Android and iOS apps. You build your own form — the SDK handles submission with device metadata attached.
- Package:
feedbackjaron pub.dev - Min SDK: Dart 3.0 / Flutter 3.10
- Platforms: Android & iOS
Installation
Add to your pubspec.yaml:
dependencies:
feedbackjar: ^1.0.0 Then run:
flutter pub get Setup
Initialize once before use — call configure in main() before runApp:
import 'package:feedbackjar/feedbackjar.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
FeedbackJar.configure('your-widget-id');
runApp(const MyApp());
} Get your widget ID from Settings → Widgets in your FeedbackJar workspace.
Submit feedback
Submissions are anonymous. Each submission automatically includes device metadata (OS version, device model, screen size, app version, locale).
final result = await FeedbackJar.shared.submit(userText);
switch (result) {
case FeedbackSuccess(:final value):
print('Submitted: ${value.postId}');
case FeedbackFailure(:final error):
print('Failed: $error');
} A callback variant is available when you are not in an async context:
FeedbackJar.shared.submitCallback(userText, (result) {
// handle result
}); List feedback
Fetch the public feedback feed with optional pagination:
final result = await FeedbackJar.shared.listFeedback(limit: 20);
if (result case FeedbackSuccess(:final value)) {
for (final post in value.posts) {
print('${post.title} — ${post.upvotes} upvotes');
}
} Pass boardId to filter by board, or cursor for pagination.
API reference
| Method | Description |
|---|---|
configure(widgetId) | Configure the SDK. Call once before anything else. |
shared.submit(content) | Submit anonymous feedback. Returns FeedbackResult<FeedbackResponse>. |
shared.listFeedback({ boardId?, limit?, cursor? }) | List public feedback. limit is clamped to 1–50. |
Results use Dart 3 pattern matching via a sealed FeedbackResult<T> class with FeedbackSuccess and FeedbackFailure subtypes.
Notes
- Only anonymous submission is supported — no user identity is sent.
- The server rate-limits submissions (5 per 15 minutes per IP).
- Private boards and non-public posts are never returned by
listFeedback.