AptofLocalizations class abstract
Callers can lookup localized strings with an instance of AptofLocalizations
returned by AptofLocalizations.of(context).
Applications need to include AptofLocalizations.delegate() in their app's
localizationDelegates list, and the locales they support in the app's
supportedLocales list. For example:
import 'gen/app_localizations.dart';
return MaterialApp(
localizationsDelegates: AptofLocalizations.localizationsDelegates,
supportedLocales: AptofLocalizations.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 AptofLocalizations.supportedLocales property.
- Implementers
Constructors
- AptofLocalizations(String locale)
Properties
- changePasswordViewAppBarTitle → String
-
Title for app bar of change password view
no setter
- changePasswordViewUpdatePasswordButtonLabel → String
-
Button label
no setter
- confirmPasswordEmptyError → String
-
Confirm password empty error
no setter
- confirmPasswordMismatchError → String
-
Error message when password did not match
no setter
- confirmPasswordTextFieldLabel → String
-
Text field label
no setter
- emailAlreadyInUseErrorMessage → String
-
Shows error when auth repository throws exception
no setter
- emailEmptyError → String
-
Error text when email is empty
no setter
- emailInvalidError → String
-
Error text when email is invalid
no setter
- emailTextFieldLabel → String
-
Email input label
no setter
- forgotViewAppBarTitle → String
-
Forgot app bar title
no setter
- forgotViewButtonLabel → String
-
Button label
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- invalidEmailErrorMessage → String
-
Shows error when auth repository throws exception
no setter
- localeName → String
-
final
- loginViewAppBarTitle → String
-
Text shown in the AppBar of the
no setter
- loginViewForgotPasswordButtonLabel → String
-
Button text
no setter
- loginViewSubmitButtonLabel → String
-
Button text
no setter
- networkErrorErrorMessage → String
-
Shows error when auth repository throws exception
no setter
- passwordEmptyError → String
-
Error text when password is empty
no setter
- passwordTextFieldLabel → String
-
Password input label
no setter
- passwordTooShortError → String
-
Error text when password is short
no setter
- profileViewAppBarTitle → String
-
Profile app bar title
no setter
- profileViewChangePasswordButtonLabel → String
-
Change Password button text
no setter
- profileViewLogoutButtonLabel → String
-
Logout button text
no setter
- requireRecentLoginErrorMessage → String
-
When recent login is required
no setter
- routerProfileLabel → String
-
Navigation Item label for profile
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splashViewPleaseWait → String
-
No description provided for @splashViewPleaseWait.
no setter
- unknownErrorErrorMessage → String
-
Shows error when auth repository throws exception
no setter
- userNotFoundErrorMessage → String
-
Shows error when auth repository throws exception
no setter
- versionInfoWidgetAvailableVersion → String
-
Available Version
no setter
- versionInfoWidgetInstalledVersion → String
-
Your Version
no setter
- versionInfoWidgetNeedUpdate → String
-
Your app needs an update
no setter
- versionInfoWidgetRequestUpdate → String
-
Request to update
no setter
- versionInfoWidgetUpdateAvailable → String
-
Update available
no setter
- versionInfoWidgetUpdateButtonLabel → String
-
Update button label
no setter
- wrongPasswordErrorMessage → String
-
Shows error when auth repository throws exception
no setter
Methods
-
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) → AptofLocalizations
Constants
-
delegate
→ const LocalizationsDelegate<
AptofLocalizations> -
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.