From a0c4407845ca5b7389b9cb7793d825ab467c441f Mon Sep 17 00:00:00 2001 From: AnhQuan Nguyen Date: Thu, 30 Apr 2026 18:55:27 -0700 Subject: [PATCH] Re-export public_ext from generated LocaleKeys file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #780. Adds `export 'package:easy_localization/src/public_ext.dart';` to the generated file's header. Consumers that already import the generated `locale_keys.g.dart` (e.g. `import 'generated/locale_keys.g.dart';`) now also pick up the `Text.tr()` / `Text.plural()` extensions without a second `import 'package:easy_localization/easy_localization.dart';` line — eliminating the two-import requirement called out in the issue. --- bin/generate.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/generate.dart b/bin/generate.dart index d9c6f040..33fa715a 100644 --- a/bin/generate.dart +++ b/bin/generate.dart @@ -177,6 +177,8 @@ Future _writeKeys(StringBuffer classBuilder, List files, // ignore_for_file: constant_identifier_names +export 'package:easy_localization/src/public_ext.dart'; + abstract class LocaleKeys { ''';