translate property

String Function(String key) translate
getter/setter pair

Resolves a base-language key to its translation in the current locale.

Defaults to returning the key unchanged. Set it once at app start, e.g. with GetX:

LocalizeIt.translate = (key) => key.tr;

Implementation

static String Function(String key) translate = _identity;