add windows as target

This commit is contained in:
2025-11-04 14:59:01 +01:00
parent ffe0af7932
commit 982654273b
25 changed files with 1223 additions and 46 deletions
+26
View File
@@ -0,0 +1,26 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
/// Opens a folder in the native file explorer.
/// Returns true if a launch was attempted.
Future<bool> openFolder(String path) async {
if (path.isEmpty) return false;
try {
if (kIsWeb) return false;
if (Platform.isWindows) {
await Process.run('explorer', [path]);
return true;
} else if (Platform.isMacOS) {
await Process.run('open', [path]);
return true;
} else if (Platform.isLinux) {
await Process.run('xdg-open', [path]);
return true;
}
} catch (_) {
// ignore errors; caller can show a message
}
return false;
}