我正在尝试生成字符串本地化文件,但是当我运行时
flutter pub run intl_translation:extract_to_arb --output-dir="lib/l10n" lib/localization/localizations.dart
它显示此错误:
Failed to precompile intl_translation:extract_to_arb:
file:///D:/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/intl_translation-0.17.4/lib/src/intl_message.dart:94:22: Error: The getter 'elements2' isn
't defined for the class 'ListLiteral'.
- 'ListLiteral' is from 'package:analyzer/dart/ast/ast.dart' ('file:///D:/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.34.3/lib/dart/a
st/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'elements2'.
if (!identifiers.elements2.every((each) => each is SimpleIdentifier)) {
^^^^^^^^^
在此video之后,我已将“ l10n”添加到我的lib https://1drv.ms/u/s!AijASouhGkzqhIkjFGQbx7Wg7knsVg(这是显示我拥有的lib目录的屏幕截图)
这是我的localizations.dart文件。