Add app source and tests
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
26
lib/Peach/see/service/ViewServiceEditor.dart
Normal file
26
lib/Peach/see/service/ViewServiceEditor.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user