Dart and Flutter translation prerequisites
The following are the prerequisites for translating Dart and Flutter projects:
Make sure that you have a supported Dart SDK (for Dart-only projects) and the Flutter SDK (for Flutter projects) installed on your system. See Supported languages for the supported Dart and Flutter SDK versions.
Download the project dependencies by running one of the following commands:
For Flutter projects, use
flutter pub get.For Dart-only projects, use
dart pub get.
For example, to download the dependencies for a Flutter project that has the project root
myproject, run the following commands:cd myproject flutter pub get
If the project includes nested packages with different
pubspec.yamlfiles, you must rundart pub getorflutter pub getfor each package root.Make sure that the following are included in the project directory:
The
pubspec.yamlfile, which specifies the dependencies- The
.dart_tooldirectory, which includes thepackage_config.jsonfile automatically generated by thepubtool