DartProject.fromRoot constructor

DartProject.fromRoot(
  1. String path
)

Creates a DartProject from the root Flutter folder, after running flutter assemble, with a command such as: flutter assemble -dTargetPlatform=windows-x64 --output=build -dBuildMode=release release_bundle_windows_assets.

The directory should contain the following top-level items:

  • icudtl.dat (provided as a resource by the Flutter tool)
  • flutter_assets (as built by the Flutter tool)
  • app.so, for an AOT build (as built by the Flutter tool)

The path can either be absolute, or relative to the directory containing the running executable.

Implementation

factory DartProject.fromRoot(String path) => DartProject(
      aotLibraryPath: p.join(path, 'build', 'windows', 'app.so'),
      assetsPath: p.join(path, 'build', 'flutter_assets'),
      icuDataPath:
          p.join(path, 'windows', 'flutter', 'ephemeral', 'icudtl.dat'),
    );