GettextLocalizations.fromBytes constructor
Write the translations from raw PO file bytes to the Gettext instance.
Decoding the bytes happens on the main isolate, which keeps loading
usable inside flutter_test (unlike rootBundle.loadString, which
offloads large assets to a background isolate).
See GettextLocalizations.fromPO for the onWarning behavior.
Implementation
GettextLocalizations.fromBytes(
List<int> bytes, {
OnWarning? onWarning = print,
}) : _gt = Gettext(onWarning: onWarning) {
_gt.addLocale(po.parseBytes(bytes));
}