checkAll method
Check all tools (required and optional) with progress
Implementation
Future<ToolCheckResult> checkAll() async {
final List<(String, Future<ToolStatus> Function())> toolCheckers = <(String, Future<ToolStatus> Function())>[
('Flutter', checkFlutter),
('Dart', checkDart),
('Firebase CLI', checkFirebase),
('FlutterFire CLI', checkFlutterFire),
('Google Cloud SDK', checkGcloud),
('Docker', checkDocker),
('npm', checkNpm),
('CocoaPods', checkCocoaPods),
('Homebrew', checkHomebrew),
];
final List<ToolStatus> tools = <ToolStatus>[];
// Show progress for each tool check
for (int i = 0; i < toolCheckers.length; i++) {
final (String name, Future<ToolStatus> Function() checker) = toolCheckers[i];
UserPrompt.showProgress(i, toolCheckers.length, 'Checking $name...');
tools.add(await checker());
}
UserPrompt.showProgress(
toolCheckers.length,
toolCheckers.length,
'All tools checked!',
);
return ToolCheckResult(tools: tools);
}