sonis_feedback 0.3.10
sonis_feedback: ^0.3.10 copied to clipboard
Sonis Panel fix widget for Flutter - a button in the corner or a shake, describe a fix, mark the problem on the screenshot, send it to the project's fixes.
sonis_feedback #
In-app feedback for Sonis Panel projects. A round button in the corner (as in the site widget) or a shake of an Android or iOS device captures the Flutter screen and sends a fix, bug report or suggestion to your project's feedback list.
Includes a dark dialog, Montserrat, Lucide icons, a screenshot you can mark up (red frame and pencil) and recent Flutter error summaries. Requires a Sonis Panel project with a widget key.
Install #
flutter pub add sonis_feedback
Requires Flutter 3.33 or later. Supports Android, iOS and Flutter Web.
Get a project key #
In Sonis Panel, open your project → Виджет and copy the Ключ. Use this public widget key, never an administrator token or password.
Reports are accepted only while client feedback is open. Otherwise the button shows a lock and a press only shows the notification Спринт ещё идёт.
Quick start #
Wrap your app and pass the same navigator key to MaterialApp:
import 'package:flutter/material.dart';
import 'package:sonis_feedback/sonis_feedback.dart';
final navigatorKey = GlobalKey<NavigatorState>();
void main() {
runApp(
SonisFeedback(
apiKey: 'pk_YOUR_PROJECT_KEY',
navigatorKey: navigatorKey,
child: MaterialApp(
navigatorKey: navigatorKey,
home: const HomePage(),
),
),
);
}
The button appears by itself in the bottom right corner. On Android/iOS a shake opens the form too (not on Web). Choose a type, enter a description and send. Reports appear in the project's fixes from «Пользователь».
Marking the screenshot #
Tap the screenshot to open it. Two red tools point at the problem: the frame (drag to outline an area) and the pencil (draw freely). Undo takes the last mark back (also Ctrl+Z / ⌘Z on a keyboard). Сохранить at the bottom right burns the marks into the screenshot — that marked picture is the one sent.
Turning it off #
On in every build, like the widget on a site. Turn it off with enabled: false or --dart-define=SONIS_FEEDBACK=false. SonisFeedback.open() does nothing when disabled or the wrapper is not mounted.
Options #
| Parameter | Default | Purpose |
|---|---|---|
apiKey |
Required | Public project widget key |
navigatorKey |
Required | The key used by your app navigator |
child |
Required | Your application |
panel |
https://panel.denielsonis.com |
Sonis Panel server URL |
enabled |
null |
false turns the widget off |
shake |
true |
Set to false to turn off shake opening |
button |
true |
Set to false to hide the round button (open from code with SonisFeedback.open()) |
For router-based apps, attach the key to the root navigator in your router configuration.
Flutter Web #
Shake detection is off on Web; use the round button. Screenshots capture the Flutter canvas; embedded HTML/platform views may be missing. The first public site the widget is opened on becomes the project's widget site; other sites with the same key are refused (reset the key in Sonis Panel to move it). Use HTTPS for deployed apps.
Platform setup #
- Android: ensure
android/app/src/main/AndroidManifest.xmlincludes<uses-permission android:name="android.permission.INTERNET" />for release test builds. No camera or storage permission is required. - iOS: add
NSMotionUsageDescriptiontoios/Runner/Info.plistwith your motion-access explanation, as required by the sensor dependency. No camera or photo-library permission is required. - Shake detection needs an accelerometer. On a simulator, use
SonisFeedback.open().
Screenshots and privacy #
Screenshots capture Flutter-rendered content before the dialog opens. Native views such as WebView and maps may be missing. If capture fails, reports can still be sent without an image.
When the tester presses Отправить, the package uploads the description, report type, screenshot (if available), operating system, logical screen dimensions and up to five recent Flutter error summaries to your configured Sonis Panel server. Inform testers and review screens for sensitive content.
The form uses Russian labels and a bundled dark Sonis theme. Localization and custom form themes are not currently exposed.
License #
Package code: MIT. Bundled Montserrat: SIL Open Font License in fonts/OFL.txt.
