-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
I have create a Flutter Plugin and want to add Internationalization following the documentation.
Everything is working perfectly for a Flutter app but not for a plugin.
While launching the example in the plugin, it seems like the plugin can't find the generated file
Error: Could not resolve the package 'flutter_gen' in 'package:flutter_gen/gen_l10n/translations.dart'. ../lib/PluginName.dart:9:8: Error: Not found: 'package:flutter_gen/gen_l10n/translations.dart' import 'package:flutter_gen/gen_l10n/translations.dart';
My l10n.yaml configuration file is :
arb-dir: assets/l10n
template-arb-file: string_en.arb
output-localization-file: translations.dart
output-class: TranslationsI did a flutter clean, flutter pub get and my IDE weems to find the 'package:flutter_gen/gen_l10n/translations.dart' and don't display any error when using
Translations.of(context).title;But I can't find a way to launch the example without having the error.