trans function

String? trans(
  1. BuildContext context,
  2. String key
)

Returns the translation value from the key you provide. E.g. trans(context, "hello") lang translation will be returned for the app locale.

Implementation

String? trans(BuildContext context, String key) =>
    AppLocalizations.of(context)!.trans(key);