Comments (2)
I don't speak Spanish, so I'm leaving this for someone who does.
from feedback.
You can create a custom class, this way you can add any language you want. This is the class I am using in my application. I am using easy_localization for the translations.
import 'package:easy_localization/easy_localization.dart';
import 'package:feedback/feedback.dart';
import 'package:flutter/material.dart';
class CustomFeedbackLocalizations implements FeedbackLocalizations {
@override
String get draw => tr('feedBackPage.draw');
@override
String get feedbackDescriptionText => tr('feedBackPage.description');
@override
String get navigate => tr('feedBackPage.navigate');
@override
String get submitButtonText => tr('feedBackPage.submit');
}
class CustomFeedbackLocalizationsDelegate
extends GlobalFeedbackLocalizationsDelegate {
@override
// ignore: overridden_fields
final supportedLocales = <Locale, FeedbackLocalizations>{
const Locale('de'): CustomFeedbackLocalizations(),
const Locale('en'): CustomFeedbackLocalizations(),
const Locale('es'): CustomFeedbackLocalizations(),
const Locale('fr'): CustomFeedbackLocalizations(),
const Locale('nl'): CustomFeedbackLocalizations(),
const Locale('pt'): CustomFeedbackLocalizations(),
const Locale('ru'): CustomFeedbackLocalizations(),
const Locale('uk'): CustomFeedbackLocalizations(),
};
}
In your BetterFeedback
widget you can use the class like so:
return BetterFeedback(
localizationsDelegates: [
...context.localizationDelegates,
CustomFeedbackLocalizationsDelegate(),
],
localeOverride: context.locale,
child: MaterialApp(
locale: context.locale,
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
),
),
It could be possible that I have forgotten something, please let me know if you need some help @as-stefit .
from feedback.
Related Issues (20)
- Allow control on DraggableSheet HOT 1
- Use the Theme data to style the 'Submit' button HOT 2
- NetPromoterScore
- Tabbing broken in dialogs HOT 2
- FeedbackSheetColor of lightTheme is applied in Darkmode HOT 1
- Adding vídeo recording HOT 2
- Cannot capture dialog HOT 1
- final image = await renderObject.toImage(pixelRatio: pixelRatio); issue HOT 6
- A better Template and Styling with Markdown for github , A new Package Required HOT 3
- Submit button seems to be cut off a bit
- Rearchitect BetterFeedback show>submit>pop Flow to Improve Dev Ex & Type Safety HOT 2
- Update to intl@^0.19.0 HOT 3
- Cupertino style HOT 7
- Backspace doesn't work HOT 5
- Color theme not apply after dialog
- Difficulty drawing straight lines
- EasyLoading Dialog not working when showAlert
- Exception is not getting in try catch block HOT 3
- BlocBuilder getting error becuase of this widget. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feedback.