mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove unused emulator diagnostics
This commit is contained in:
parent
e2b8c86b96
commit
b7497d558f
@ -65,14 +65,6 @@ class EmulatorsCommand extends FlutterCommand {
|
|||||||
// 'You may need to create images using "flutter emulators --create"\n'
|
// 'You may need to create images using "flutter emulators --create"\n'
|
||||||
'You may need to create one using Android Studio '
|
'You may need to create one using Android Studio '
|
||||||
'or visit https://flutter.io/setup/ for troubleshooting tips.');
|
'or visit https://flutter.io/setup/ for troubleshooting tips.');
|
||||||
final List<String> diagnostics =
|
|
||||||
await emulatorManager.getEmulatorDiagnostics();
|
|
||||||
if (diagnostics.isNotEmpty) {
|
|
||||||
printStatus('');
|
|
||||||
for (String diagnostic in diagnostics) {
|
|
||||||
printStatus('• ${diagnostic.replaceAll('\n', '\n ')}');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
printStatus(
|
printStatus(
|
||||||
'${emulators.length} available ${pluralize('emulator', emulators.length)}:\n');
|
'${emulators.length} available ${pluralize('emulator', emulators.length)}:\n');
|
||||||
|
@ -90,15 +90,6 @@ class EmulatorManager {
|
|||||||
bool get canListAnything {
|
bool get canListAnything {
|
||||||
return _platformDiscoverers.any((EmulatorDiscovery discoverer) => discoverer.canListAnything);
|
return _platformDiscoverers.any((EmulatorDiscovery discoverer) => discoverer.canListAnything);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get diagnostics about issues with any emulators.
|
|
||||||
Future<List<String>> getEmulatorDiagnostics() async {
|
|
||||||
final List<String> diagnostics = <String>[];
|
|
||||||
for (EmulatorDiscovery discoverer in _platformDiscoverers) {
|
|
||||||
diagnostics.addAll(await discoverer.getDiagnostics());
|
|
||||||
}
|
|
||||||
return diagnostics;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An abstract class to discover and enumerate a specific type of emulators.
|
/// An abstract class to discover and enumerate a specific type of emulators.
|
||||||
@ -110,10 +101,6 @@ abstract class EmulatorDiscovery {
|
|||||||
bool get canListAnything;
|
bool get canListAnything;
|
||||||
|
|
||||||
Future<List<Emulator>> get emulators;
|
Future<List<Emulator>> get emulators;
|
||||||
|
|
||||||
/// Gets a list of diagnostic messages pertaining to issues with any available
|
|
||||||
/// emulators (will be an empty list if there are no issues).
|
|
||||||
Future<List<String>> getDiagnostics() => new Future<List<String>>.value(<String>[]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class Emulator {
|
abstract class Emulator {
|
||||||
|
Loading…
Reference in New Issue
Block a user