What's New in Flutter SDK 1.1
Flutter SDK 1.1 was tagged on 15 April. Its changelog lists community files for the repository and a new server address, which undersells it: the code between Flutter SDK 1.0 and the 1.1.0 tag also translates the widgets, adds a mailing-list opt-in to the form, and adds a field to the request model. This post lists all of it, along with what did not change.
The short version
- New: the widgets' text in eleven languages, picked from the device language, with
localeandtranslationsonFeedbackKitProvider. - New: a mailing-list opt-in on
SubmitFeedbackView, and matching fields onCreateFeedbackRequestandvotes.vote(). - New:
FeedbackItem.isHiddenOverLimit. - Changed: the built-in server address is now
https://api.prod.getfeedbackkit.com/api/v1. - Install: 1.1 is a git dependency. pub.dev still holds 1.0.0 and 1.0.1.
Installing 1.1
flutter pub add feedbackkit_flutter still installs 1.0.1, and a ^1.1.0 constraint does not resolve from pub.dev. Depend on the tag in the SDK's repository instead:
dependencies:
feedbackkit_flutter:
git:
url: https://github.com/Swiftly-Developed/SwiftlyFeedbackKit-Flutter-SDK.git
ref: 1.1.0
A note on 1.1.1. A 1.1.1 tag followed on 24 April to keep the version in line with the Swift SDK's hotfix. It changes the version number and the support table in the repository's security policy, and no Dart code, so ref: 1.1.1 gives you the same SDK as this post describes.
The requirements are unchanged: Flutter 3.10 and Dart 3.0 or later.
Eleven languages
Every string the widgets draw now comes from a catalog: the list's loading, empty and error states, the form's labels and errors, the detail screen's comment section, the status and category names, and the relative dates on the detail screen. The SDK ships English, Spanish, French, German, Japanese, Simplified Chinese, Brazilian Portuguese, Korean, Italian, Arabic and Russian.
The language comes from the device. The SDK tries the full language tag, then language and script (for zh-Hans), then language and region (for pt-BR), then the bare language, and falls back to English. Two new provider parameters override it:
FeedbackKitProvider(
apiKey: const String.fromEnvironment('FEEDBACKKIT_API_KEY'),
userId: userId,
locale: 'de',
translations: const {
'feedback.list.empty': 'Noch keine Ideen für Trailmate',
'feedback.submit.title': 'Idee vorschlagen',
},
child: const MaterialApp(home: IdeasScreen()),
)
translations replaces single strings by key, in whatever language is active, and wins over the built-in catalog. The class behind it, FeedbackKitLocalizations, is public: t(key) looks a string up, setLocale() switches language, and registerTranslations('nl', {...}) adds a language the SDK does not ship. A missing key falls back to English, then to the key itself.
Three things to know:
- The language is read once. The device language is detected when the SDK looks up its earliest string, and
localeandtranslationsare applied when the provider starts. A language change while the app runs shows at the next launch. - Two strings on the cards stay English.
FeedbackCarditself was not changed, so its badges are translated but its comment count ("3 comments") and the request's age ("2d ago") are not. The detail screen's dates are translated. - Relative dates are suffixes. Keys such as
time.daysAgohold the text after the number, like "d ago". Keep that shape if you override them.
A mailing-list opt-in on the form
Once someone types an email into SubmitFeedbackView, a checkbox appears below it: "Subscribe to our mailing list for product updates", unchecked. Ticking it opens two more, for operational emails (status updates, account) and marketing emails (newsletters, promotions), both ticked. Clearing the email hides them and resets them. The choices go out as subscribeToMailingList and mailingListEmailTypes, and both are now fields on CreateFeedbackRequest and named parameters on votes.vote() for your own screens. The vote button does not use them.
In 1.1.0 the opt-in does not yet subscribe anyone. The server adds someone to your email list when the request carries their address and the project has an email-list integration switched on, a Pro feature. But 1.1.0 still sends the form's address as email, which the server does not read, as in 1.0, and votes.vote() sends no address at all. Leave the checkbox in place if you like, knowing it records nothing yet.
The hidden-over-limit flag
On the Free plan a project holds 10 requests. Further requests are saved but hidden from the board, and the server returns such a request to the person who filed it, flagged. FeedbackItem now reads that flag as isHiddenOverLimit, a nullable bool. The widgets do not use it. In your own screens you can tell the person their request is waiting rather than missing.
A new server address
The built-in default moved to https://api.prod.getfeedbackkit.com/api/v1, FeedbackKit's production server under its new domain. If you passed the production address as baseUrl in 1.0, you can remove it, or set it to the new address.
What did not change
Of the five issues listed for 1.0, the server address is the one 1.1.0 settles. The other four remain:
- The SDK does not create a user id, so filing and voting fail without one.
- Removing a vote fails, because the user id goes on the query string and the server reads it from the body.
- Posting a comment fails, and comment authors show as "Anonymous" with no Team label.
- The email typed into the form does not reach the server, so people who file from Flutter are not emailed when a status changes.
The Flutter SDK 1.0 tutorial has a way around each one where there is one, and its code compiles unchanged against 1.1.0.
How FeedbackKit fits in
Statuses are where your team's decisions become visible to your users, and in 1.1 their names appear in your users' language. In the admin apps, your team moves each request through the same six statuses that the badges show. Here is how that looks in FeedbackKit, with sample data from a fictional hiking app:
Statuses your users can see
Upgrading from 1.0
- Replace the pub.dev version in
pubspec.yamlwith the git dependency above, and runflutter pub get. - Remove
baseUrlor point it at the new address. - Check your screens in another language. Text in some languages runs longer than the English it replaces, and the category chips and buttons grow with it.
- Decide what to do with the mailing-list checkbox, which appears as soon as someone types an email.
The full reference is in the Flutter SDK docs. If you are starting today, use the current Flutter tutorial.
Every plan includes the Flutter SDK. Start free and add the board to your app.