generateOfKeyFactories property

bool generateOfKeyFactories
final

When set to true you will gain access to additional methods ofKey and maybeOfKey. They will allow you to get LocalizedString at runtime with key from translation file, for example:

Strings.ofKey('test_message').getRaw();

// or with generics
Strings.ofKey<ArgLocalizedString2>('test_message').get('hello', 'world');

This feature is disabled by default because it introduces a point of possible runtime failure - use at your own risk.

Implementation

final bool generateOfKeyFactories;