UIWidgetLocalizations class abstract

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

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

import 'l10n/ui_widget_localizations.dart';

return MaterialApp(
  localizationsDelegates: UIWidgetLocalizations.localizationsDelegates,
  supportedLocales: UIWidgetLocalizations.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 UIWidgetLocalizations.supportedLocales property.

Implementers

Constructors

UIWidgetLocalizations(String locale)

Properties

codeNotReceivedText String
No description provided for @codeNotReceivedText.
no setter
confirmPasswordFieldName String
No description provided for @confirmPasswordFieldName.
no setter
confirmPasswordLongErrorMessage String
No description provided for @confirmPasswordLongErrorMessage.
no setter
confirmPasswordShortErrorMessage String
No description provided for @confirmPasswordShortErrorMessage.
no setter
emailAddressFieldName String
No description provided for @emailAddressFieldName.
no setter
hashCode int
The hash code for this object.
no setterinherited
invalidList String
No description provided for @invalidList.
no setter
invalidMessage String
No description provided for @invalidMessage.
no setter
invalidNumber String
No description provided for @invalidNumber.
no setter
invalidPattern String
No description provided for @invalidPattern.
no setter
invalidPhoneNumberErrorMessage String
No description provided for @invalidPhoneNumberErrorMessage.
no setter
localeName String
final
newPasswordFieldName String
No description provided for @newPasswordFieldName.
no setter
passwordFieldName String
No description provided for @passwordFieldName.
no setter
passwordLowercaseCharErrorMessage String
No description provided for @passwordLowercaseCharErrorMessage.
no setter
passwordNumberErrorMessage String
No description provided for @passwordNumberErrorMessage.
no setter
passwordSpecialCharErrorMessage String
No description provided for @passwordSpecialCharErrorMessage.
no setter
passwordTooShortErrorMessage String
No description provided for @passwordTooShortErrorMessage.
no setter
passwordUppercaseCharErrorMessage String
No description provided for @passwordUppercaseCharErrorMessage.
no setter
phoneNumberFieldName String
No description provided for @phoneNumberFieldName.
no setter
resendCodeText String
No description provided for @resendCodeText.
no setter
resetPasswordText String
No description provided for @resetPasswordText.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tooShortMessage String
No description provided for @tooShortMessage.
no setter
usernameFieldName String
No description provided for @usernameFieldName.
no setter

Methods

invalidEmailErrorMessage(String value) String
No description provided for @invalidEmailErrorMessage.
invalidPatternWithExamples(String examples) String
No description provided for @invalidPatternWithExamples.
invalidRange(int min, int max) String
No description provided for @invalidRange.
invalidRangeMax(int max) String
No description provided for @invalidRangeMax.
invalidRangeMin(int min) String
No description provided for @invalidRangeMin.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tooShortErrorMessage(String fieldName, int length) String
No description provided for @tooShortErrorMessage.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) UIWidgetLocalizations

Constants

delegate → const LocalizationsDelegate<UIWidgetLocalizations>
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.