Commit 32941a8c authored by stuartmorgan's avatar stuartmorgan Committed by Michael Goderbauer

Add Windows support to defaultTargetPlatform (#19176)

A significant amonut of code uses defaultTargetPlatform, so it's
currently impossible to run most apps on Windows. This adds a mapping
from Windows as a host to Android as a target, paralleling the
macOS->iOS and Linux->Android mappings.

This allows more use of Windows as a host platform (e.g., for testing,
as in issue #17768).
parent 66091f96
...@@ -34,7 +34,7 @@ TargetPlatform get defaultTargetPlatform { ...@@ -34,7 +34,7 @@ TargetPlatform get defaultTargetPlatform {
TargetPlatform result; TargetPlatform result;
if (Platform.isIOS || Platform.isMacOS) { if (Platform.isIOS || Platform.isMacOS) {
result = TargetPlatform.iOS; result = TargetPlatform.iOS;
} else if (Platform.isAndroid || Platform.isLinux) { } else if (Platform.isAndroid || Platform.isLinux || Platform.isWindows) {
result = TargetPlatform.android; result = TargetPlatform.android;
} else if (Platform.operatingSystem == 'fuchsia') { } else if (Platform.operatingSystem == 'fuchsia') {
result = TargetPlatform.fuchsia; result = TargetPlatform.fuchsia;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment