I18n constructor
const
I18n({
- I18nLayerInteraction layerInteraction = const I18nLayerInteraction(),
- I18nPaintingEditor paintEditor = const I18nPaintingEditor(),
- I18nTextEditor textEditor = const I18nTextEditor(),
- I18nCropRotateEditor cropRotateEditor = const I18nCropRotateEditor(),
- I18nFilterEditor filterEditor = const I18nFilterEditor(),
- I18nBlurEditor blurEditor = const I18nBlurEditor(),
- I18nEmojiEditor emojiEditor = const I18nEmojiEditor(),
- I18nStickerEditor stickerEditor = const I18nStickerEditor(),
- I18nVarious various = const I18nVarious(),
- String importStateHistoryMsg = '',
- String cancel = '',
- String undo = '',
- String redo = '',
- String done = '',
- String remove = '',
- String doneLoadingMsg = '',
Creates an instance of I18n with customizable internationalization settings.
You can provide translations and messages for various components of the Image Editor by specifying the corresponding I18n subclasses. If a specific translation is not provided, default values will be used.
The cancel
, undo
, redo
, and done
parameters allow you to specify
the text for the respective buttons in the Image Editor interface.
The doneLoadingMsg
parameter is used to display a message while changes
are being applied.
Example:
I18n(
various: I18nVarious(
// Custom translations and settings for various components
),
paintEditor: I18nPaintingEditor(
// Custom translations and settings for the Painting Editor
),
textEditor: I18nTextEditor(
// Custom translations and settings for the Text Editor
),
// Additional settings for other components...
cancel: 'Cancel',
undo: 'Undo',
redo: 'Redo',
done: 'Done',
remove: 'Remove',
doneLoadingMsg: 'Changes are being applied',
)
Implementation
const I18n({
this.layerInteraction = const I18nLayerInteraction(),
this.paintEditor = const I18nPaintingEditor(),
this.textEditor = const I18nTextEditor(),
this.cropRotateEditor = const I18nCropRotateEditor(),
this.filterEditor = const I18nFilterEditor(),
this.blurEditor = const I18nBlurEditor(),
this.emojiEditor = const I18nEmojiEditor(),
this.stickerEditor = const I18nStickerEditor(),
this.various = const I18nVarious(),
this.importStateHistoryMsg = '',
this.cancel = '',
this.undo = '',
this.redo = '',
this.done = '',
this.remove = '',
this.doneLoadingMsg = '',
});