Closed evanwsu closed 11 months ago
As far as I remember, the Flutter Intl plugin does not support the use of a custom source for the intl_utils
package. However, you could consider adding a custom source as a dev dependency to your project. After that, you can invoke it manually or integrate it with a build runner to automate the process (I haven't checked this approach). This method may serve as a workaround for your use case.
The pubspec.yaml
file:
dev_dependencies:
flutter_test:
sdk: flutter
intl_utils:
git:
url: https://github.com/localizely/intl_utils # Your source
flutter_intl:
enabled: false # Disable Flutter Intl to prevent overwriting
Manually generate localization code:
dart run intl_utils:generate
After each arb file is edited, the dart instruction is not automated, and I like the Intl plugin's save-as-build feature.
Maybe I need to write my own IntelliJ IDEA plugin, but I have no experience. If the Flutter Intl plugin supports configurable intl_utils, it will pub global activate --source custom_intl_utils
is great.
I have resolved the issue by using an external tool along with a shortcut key.
I want to use a custom intl_utils source, what do I do? When enabled is true, run pub get, which downloads intl_utils from pub.dev to override the locally activated intl_utils.