Skip to content

Commit c330f62

Browse files
authored
Fix unsupported devices not showing "Enable x" if there are no other devices (#9428)
In the list of devices we include devices that are not supported/enabled for the current platform, allowing you to enable them. However, the logic here would skip the entire device table if there are no enabled/supported devices, which would cause nothing to show up if there are none already enabled. This changes the logic so the table is always shown if there are either kind of device, and only shows the help text if none are enabled. Fixes Dart-Code/Dart-Code#5661
1 parent 2c03846 commit c330f62

File tree

1 file changed

+3
-2
lines changed
  • packages/devtools_app/lib/src/standalone_ui/vs_code

1 file changed

+3
-2
lines changed

packages/devtools_app/lib/src/standalone_ui/vs_code/devices.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ class Devices extends StatelessWidget {
4141
children: [
4242
Text('Devices', style: theme.textTheme.titleMedium),
4343
if (supportedDevices.isEmpty)
44-
const Text('Connect a device or enable web/desktop platforms.')
45-
else
44+
const Text('Connect a device or enable a platform'),
45+
if (supportedDevices.isNotEmpty ||
46+
unsupportedDevicePlatformTypes.isNotEmpty)
4647
Table(
4748
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
4849
children: [

0 commit comments

Comments
 (0)