mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
When setting FlutterProjectArgs.command_line_argv prior to launching the engine, we were previously setting a placeholder value rather than the executable name. This resulted in Platform.executable (from dart:io) returning "placeholder" in application code. This updates the Windows implementation for consistency with macOS and guarantees that Platform.executable will return a reasonable value in Dart code. Note that this does not affect Platform.resolvedExecutable, which returns a full, resolved path, and is implemented in the Dart runtime itself. Previously the code: print(Platform.executable); print(Platform.resolvedExecutable); resulted in the following output on Windows: flutter: placeholder flutter: C:\path\to\project\build\windows\runner\Debug\project.exe after this patch, it results in: flutter: project.exe flutter: C:\path\to\project\build\windows\runner\Debug\project.exe Issue: https://github.com/flutter/flutter/issues/83921
Description
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
androidapp-frameworkcross-platformdartdart-platformdesktopflutterflutter-packagefuchsiaioslinux-desktopmacosmaterial-designmobilemobile-developmentskiawebweb-frameworkwindows
2.5 GiB
Languages
Dart
75%
C++
16.5%
Objective-C++
2.9%
Java
2.8%
Objective-C
0.7%
Other
1.9%