CdxChatLocalizations class abstract

Callers can lookup localized strings with an instance of CdxChatLocalizations returned by CdxChatLocalizations.of(context).

Applications need to include CdxChatLocalizations.delegate() in their app's localizationDelegates list, and the locales they support in the app's supportedLocales list. For example:

import 'l10n/app_localizations.dart';

return MaterialApp(
  localizationsDelegates: CdxChatLocalizations.localizationsDelegates,
  supportedLocales: CdxChatLocalizations.supportedLocales,
  home: MyApplicationHome(),
);

Update pubspec.yaml

Please make sure to update your pubspec.yaml to include the following packages:

dependencies:
  # Internationalization support.
  flutter_localizations:
    sdk: flutter
  intl: any # Use the pinned version from flutter_localizations

  # Rest of dependencies

iOS Applications

iOS applications define key application metadata, including supported locales, in an Info.plist file that is built into the application bundle. To configure the locales supported by your app, you’ll need to edit this file.

First, open your project’s ios/Runner.xcworkspace Xcode workspace file. Then, in the Project Navigator, open the Info.plist file under the Runner project’s Runner folder.

Next, select the Information Property List item, select Add Item from the Editor menu, then select Localizations from the pop-up menu.

Select and expand the newly-created Localizations item then, for each locale your application supports, add a new item and select the locale you wish to add from the pop-up menu in the Value field. This list should be consistent with the languages listed in the CdxChatLocalizations.supportedLocales property.

Implementers

Constructors

CdxChatLocalizations(String locale)

Properties

block_user String
Block user action label
no setter
cancel String
Cancel button text
no setter
chat String
Title for chat section
no setter
confirm String
Confirm button text
no setter
delete String
Delete action label
no setter
delete_message String
Title for delete message dialog
no setter
error_loading_messages String
Error message when messages fail to load
no setter
error_sending_message String
Error message when sending a message fails
no setter
hashCode int
The hash code for this object.
no setterinherited
localeName String
final
message_deleted String
Text shown for deleted messages
no setter
message_empty String
Error message when message is empty
no setter
no_messages String
Message shown when there are no messages
no setter
q_block_user String
Confirmation question for blocking a user
no setter
q_delete_message String
Confirmation question for deleting a message
no setter
q_unblock_user String
Confirmation question for unblocking a user
no setter
replying_to String
Label showing who you are replying to
no setter
retry String
Retry button text
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
send String
Button text to send a message
no setter
type_a_message String
Placeholder text for message input field
no setter
unblock_user String
Unblock user action label
no setter

Methods

message_too_long(int maxLength) String
Error message when message is too long
message_too_many_lines(int maxLines) String
Error message when message has too many lines
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) CdxChatLocalizations?

Constants

delegate → const LocalizationsDelegate<CdxChatLocalizations>
localizationsDelegates → const List<LocalizationsDelegate>
A list of this localizations delegate along with the default localizations delegates.
supportedLocales → const List<Locale>
A list of this localizations delegate's supported locales.