ActivityLocalizations class abstract
Callers can lookup localized strings with an instance of ActivityLocalizations
returned by ActivityLocalizations.of(context).
Applications need to include ActivityLocalizations.delegate() in their app's
localizationDelegates list, and the locales they support in the app's
supportedLocales list. For example:
import 'generated/activity_localizations.dart';
return MaterialApp(
localizationsDelegates: ActivityLocalizations.localizationsDelegates,
supportedLocales: ActivityLocalizations.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 ActivityLocalizations.supportedLocales property.
Constructors
- ActivityLocalizations(String locale)
Properties
- activity_addNew → String
-
Add new activity button text
no setter
- activity_assignee → String
-
Label for assigned employee field
no setter
- activity_create → String
-
Create button text for activities
no setter
- activity_description → String
-
Label for activity description field
no setter
- activity_employeeName → String
-
Label for employee name field
no setter
- activity_fieldRequired → String
-
Generic required field error message
no setter
- activity_id → String
-
Label for activity ID field
no setter
- activity_name → String
-
Label for activity name field
no setter
- activity_new → String
-
New activity button text
no setter
- activity_price → String
-
Price of a product or service
no setter
- activity_selectEmployee → String
-
Dropdown hint for selecting an employee
no setter
- activity_selectThirdParty → String
-
Dropdown hint for selecting a third party
no setter
- activity_serverError → String
-
Error message for server connectivity issues
no setter
- activity_startDate → String
-
Label for activity estimated start date field
no setter
- activity_status → String
-
Label for activity status field
no setter
- activity_thirdParty → String
-
Label for third party field
no setter
- activity_thirdPartyName → String
-
Label for third party name field
no setter
- activity_timeEntries → String
-
Label for time entries section
no setter
- activity_update → String
-
Update button text for activities
no setter
- activityAddFailure → String
-
BLoC message: Failed to add activity
no setter
- activityAddSuccess → String
-
BLoC message: Activity added successfully
no setter
- activityDeleteFailure → String
-
BLoC message: Failed to delete activity
no setter
- activityDeleteSuccess → String
-
BLoC message: Activity deleted successfully
no setter
- activityFetchFailure → String
-
BLoC message: Failed to fetch activities
no setter
- activityUpdateFailure → String
-
BLoC message: Failed to update activity
no setter
- activityUpdateSuccess → String
-
BLoC message: Activity updated successfully
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- localeName → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeEntry_addSuccess → String
-
Success message for adding time entry
no setter
- timeEntry_comments → String
-
Label for time entry comments field
no setter
- timeEntry_hours → String
-
Label for number of hours field
no setter
- timeEntry_hoursError → String
-
Error message for empty hours field
no setter
- timeEntry_listTitle → String
-
Header for time entry information list
no setter
- timeEntry_new → String
-
Label for new time entry
no setter
- timeEntry_notFound → String
-
Message when no time entries are available
no setter
- timeEntry_title → String
-
Header for time entry form
no setter
- timeEntry_updateDate → String
-
Label for time entry update date field
no setter
- timeEntry_updateSuccess → String
-
Success message for updating time entry
no setter
Methods
-
activity_error(
String message) → String - Generic error message with details
-
activity_fetchError(
String activityType, String message) → String - Error message when fetching activities fails
-
activity_loadError(
String activityType) → String - Error message when activity fails to load
-
activity_nameError(
String activityType) → String - Error message for empty activity name field
-
activity_notFound(
String activityType) → String - Message when no activities are found
-
activity_title(
String activityType, String pseudoId) → String - Title format for activity with type and ID
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
timeEntry_id(
String timeEntryId) → String - Time entry ID format
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → ActivityLocalizations?
Constants
-
delegate
→ const LocalizationsDelegate<
ActivityLocalizations> -
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.