pl method

  1. @protected
String pl(
  1. String key, [
  2. Map<String, Object>? namedParameters
])

Calls l with the specified localizationKey.

For example, if localizationKey is pages.home and key is title, it is localized as pages.home.title. An assertion error occurs if localizationKey is not set.

Implementation

@protected
String pl(
  String key, [
  Map<String, Object>? namedParameters,
]) {
  assert(localizationKey.isNotEmpty,
      'localizationKey is not set. Please override localizationKey.');

  return l(context, '$localizationKey.$key', namedParameters);
}