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.yaml files, you must run dart pub get or flutter pub get for each package root.

    Make sure that the following are included in the project directory:

    • The pubspec.yaml file, which specifies the dependencies

    • The .dart_tool directory, which includes the package_config.json file automatically generated by the pub tool