import 'package:file_picker/file_picker.dart'; import '../parent/ParentViewModel.dart'; import 'ConnectServiceEditor.dart'; class ViewServiceEditor extends ParentViewModel { ConnectServiceEditor connection; ViewServiceEditor(super.context, this.connection); /// True on desktop, where a local build can actually run. bool get canBuildLocally => getDataManager().buildSupported; /// Opens the OS folder picker for the service's source project. void pickProjectDirectory() async { try { final directory = await FilePicker.getDirectoryPath( dialogTitle: 'Select the service project folder', ); if (directory == null) return; connection.onProjectDirectoryPicked(directory); } catch (error) { handleError(error, pickProjectDirectory, () {}, "Retry"); } } }