PaywallLocalizations class Null safety

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

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

import 'gen_l10n/paywall_localizations.dart';

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

Implementers

Constructors

PaywallLocalizations(String locale)

Properties

app_bar_default_title String
No description provided for @app_bar_default_title.
read-only
biannual String
No description provided for @biannual.
read-only
continue_button String
A button to select a premium subscription
read-only
day String
No description provided for @day.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
localeName String
final
manage_subscription_apple_appstore_button String
No description provided for @manage_subscription_apple_appstore_button.
read-only
manage_subscription_apple_appstore_title String
No description provided for @manage_subscription_apple_appstore_title.
read-only
manage_subscription_google_play_button String
No description provided for @manage_subscription_google_play_button.
read-only
manage_subscription_google_play_title String
No description provided for @manage_subscription_google_play_title.
read-only
manage_subscriptions_title String
No description provided for @manage_subscriptions_title.
read-only
month String
No description provided for @month.
read-only
monthly String
No description provided for @monthly.
read-only
A banner usually to show which subscription is most popular
read-only
premium String
No description provided for @premium.
read-only
quarterly String
No description provided for @quarterly.
read-only
restore_purchase String
No description provided for @restore_purchase.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
subscription_options_title String
No description provided for @subscription_options_title.
read-only
week String
No description provided for @week.
read-only
weekly String
No description provided for @weekly.
read-only
year String
No description provided for @year.
read-only
yearly String
No description provided for @yearly.
read-only

Methods

manage_subscription_productId(String productId) String
No description provided for @manage_subscription_productId.
nday(num count) String
No description provided for @nday.
nmonth(num count) String
No description provided for @nmonth.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
nweek(num count) String
No description provided for @nweek.
nyear(num count) String
No description provided for @nyear.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) PaywallLocalizations?

Constants

delegate → const LocalizationsDelegate<PaywallLocalizations>
_PaywallLocalizationsDelegate()
localizationsDelegates → const List<LocalizationsDelegate>
A list of this localizations delegate along with the default localizations delegates.
<LocalizationsDelegate<dynamic>>[delegate, GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, GlobalWidgetsLocalizations.delegate]
supportedLocales → const List<Locale>
A list of this localizations delegate's supported locales.
<Locale>[Locale('de'), Locale('en'), Locale('es')]