mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[flutter tools] Revert desktop device name changes and print the category instead (#60395)
This commit is contained in:
parent
ca713557d7
commit
cf8fbc363a
@ -559,7 +559,7 @@ abstract class Device {
|
||||
supportIndicator += ' ($type)';
|
||||
}
|
||||
table.add(<String>[
|
||||
device.name,
|
||||
'${device.name} (${device.category})',
|
||||
device.id,
|
||||
getNameForTargetPlatform(targetPlatform),
|
||||
'${await device.sdkNameAndVersion}$supportIndicator',
|
||||
|
||||
@ -26,7 +26,7 @@ class LinuxDevice extends DesktopDevice {
|
||||
bool isSupported() => true;
|
||||
|
||||
@override
|
||||
String get name => 'Linux desktop';
|
||||
String get name => 'Linux';
|
||||
|
||||
@override
|
||||
Future<TargetPlatform> get targetPlatform async => TargetPlatform.linux_x64;
|
||||
|
||||
@ -24,7 +24,7 @@ class MacOSDevice extends DesktopDevice {
|
||||
bool isSupported() => true;
|
||||
|
||||
@override
|
||||
String get name => 'macOS desktop';
|
||||
String get name => 'macOS';
|
||||
|
||||
@override
|
||||
Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin_x64;
|
||||
|
||||
@ -27,7 +27,7 @@ class WindowsDevice extends DesktopDevice {
|
||||
bool isSupported() => true;
|
||||
|
||||
@override
|
||||
String get name => 'Windows desktop';
|
||||
String get name => 'Windows';
|
||||
|
||||
@override
|
||||
Future<TargetPlatform> get targetPlatform async => TargetPlatform.windows_x64;
|
||||
|
||||
@ -120,8 +120,8 @@ void main() {
|
||||
'''
|
||||
2 connected devices:
|
||||
|
||||
ephemeral • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
|
||||
webby • webby • web-javascript • Web SDK (1.2.4) (emulator)
|
||||
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
|
||||
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
|
||||
|
||||
• Cannot connect to device ABC
|
||||
'''
|
||||
|
||||
@ -28,7 +28,7 @@ void main() {
|
||||
testWithoutContext('LinuxDevice defaults', () async {
|
||||
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
|
||||
expect(await device.targetPlatform, TargetPlatform.linux_x64);
|
||||
expect(device.name, 'Linux desktop');
|
||||
expect(device.name, 'Linux');
|
||||
expect(await device.installApp(linuxApp), true);
|
||||
expect(await device.uninstallApp(linuxApp), true);
|
||||
expect(await device.isLatestBuildInstalled(linuxApp), true);
|
||||
|
||||
@ -40,7 +40,7 @@ void main() {
|
||||
testUsingContext('defaults', () async {
|
||||
final MockMacOSApp mockMacOSApp = MockMacOSApp();
|
||||
expect(await device.targetPlatform, TargetPlatform.darwin_x64);
|
||||
expect(device.name, 'macOS desktop');
|
||||
expect(device.name, 'macOS');
|
||||
expect(await device.installApp(mockMacOSApp), true);
|
||||
expect(await device.uninstallApp(mockMacOSApp), true);
|
||||
expect(await device.isLatestBuildInstalled(mockMacOSApp), true);
|
||||
|
||||
@ -32,7 +32,7 @@ void main() {
|
||||
testUsingContext('defaults', () async {
|
||||
final PrebuiltWindowsApp windowsApp = PrebuiltWindowsApp(executable: 'foo');
|
||||
expect(await device.targetPlatform, TargetPlatform.windows_x64);
|
||||
expect(device.name, 'Windows desktop');
|
||||
expect(device.name, 'Windows');
|
||||
expect(await device.installApp(windowsApp), true);
|
||||
expect(await device.uninstallApp(windowsApp), true);
|
||||
expect(await device.isLatestBuildInstalled(windowsApp), true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user