Merge branch 'main' into codex/async-ffi-worker-callbacks

This commit is contained in:
Levi authored and GitHub committed 2026-09-07 09:23:59 +08:00
commit 0f60f40e3e
14 files changed
+136 -79

No files matched your search

+1 -1
View File
@@ -594,7 +594,7 @@ jobs:
overwrite: true overwrite: true
build-ios: build-ios:
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios' }} if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios' }}
runs-on: macos-14 runs-on: macos-26
needs: [get-release] needs: [get-release]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
+1 -1
View File
@@ -213,7 +213,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ macos-14, ubuntu-latest ] os: [ macos-26, ubuntu-latest ]
needs: [ test ] needs: [ test ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
+1 -1
View File
@@ -1,4 +1,4 @@
platform :ios, '13.0' platform :ios, '14.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -693,7 +693,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@@ -823,7 +823,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@@ -874,7 +874,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@@ -210,7 +210,7 @@ class _ExtensionsPageState extends ConsumerState<ExtensionsPage> {
} }
Future<void> _installFromFolder() async { Future<void> _installFromFolder() async {
final folder = await FilePicker.platform.getDirectoryPath(); final folder = await FilePicker.getDirectoryPath();
if (folder == null || folder.isEmpty) return; if (folder == null || folder.isEmpty) return;
await _runAction(() => ref.read(extensionsControllerProvider.notifier).installFromUrl(folder, devInstall: true)); await _runAction(() => ref.read(extensionsControllerProvider.notifier).installFromUrl(folder, devInstall: true));
} }
@@ -1378,8 +1378,8 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
initialValue: index == null ? '' : paths[index], initialValue: index == null ? '' : paths[index],
pickPath: Util.isDesktop() pickPath: Util.isDesktop()
? () async { ? () async {
final result = await FilePicker.platform.pickFiles(); final file = await FilePicker.pickFile();
return result?.files.firstOrNull?.path; return file?.path;
} }
: null, : null,
); );
@@ -763,15 +763,10 @@ class _CreateTaskWindowPageState extends ConsumerState<CreateTaskWindowPage> {
} }
Future<void> _pickTorrentFile() async { Future<void> _pickTorrentFile() async {
final result = await FilePicker.platform.pickFiles( final file = await FilePicker.pickFile(type: FileType.custom, allowedExtensions: const ['torrent']);
type: FileType.custom,
allowedExtensions: const ['torrent'],
withData: kIsWeb,
);
final file = result?.files.single;
if (file == null) return; if (file == null) return;
await _applyTorrentFile(name: file.name, filePath: file.path, bytes: file.bytes); await _applyTorrentFile(name: file.name, filePath: file.path, readBytes: file.readAsBytes);
} }
Future<void> _handleDroppedTorrent(DropDoneDetails details) async { Future<void> _handleDroppedTorrent(DropDoneDetails details) async {
@@ -109,7 +109,7 @@ class _TaskFileManagerViewState extends State<TaskFileManagerView> {
try { try {
final renderBox = actionContext.findRenderObject(); final renderBox = actionContext.findRenderObject();
final origin = renderBox is RenderBox ? renderBox.localToGlobal(Offset.zero) & renderBox.size : null; final origin = renderBox is RenderBox ? renderBox.localToGlobal(Offset.zero) & renderBox.size : null;
await Share.shareXFiles([XFile(_localPath(entry))], sharePositionOrigin: origin); await SharePlus.instance.share(ShareParams(files: [XFile(_localPath(entry))], sharePositionOrigin: origin));
} catch (error) { } catch (error) {
if (mounted) showAppToast(context, error.toString(), type: AppToastType.error); if (mounted) showAppToast(context, error.toString(), type: AppToastType.error);
} }
@@ -58,7 +58,7 @@ class DownloadDirectoryPicker {
return _pickAndroid(context, currentPath: currentPath); return _pickAndroid(context, currentPath: currentPath);
} }
if (_platform == TargetPlatform.iOS) return null; if (_platform == TargetPlatform.iOS) return null;
return FilePicker.platform.getDirectoryPath(); return FilePicker.getDirectoryPath();
} }
static Future<String?> _pickAndroid(BuildContext context, {required String currentPath}) async { static Future<String?> _pickAndroid(BuildContext context, {required String currentPath}) async {
@@ -251,7 +251,7 @@ Future<String?> _getManifestPath(Browser browser) async {
Future<bool> _checkWindowsRegistry(String keyPath) async { Future<bool> _checkWindowsRegistry(String keyPath) async {
try { try {
final key = Registry.openPath(RegistryHive.localMachine, path: keyPath); final key = LOCAL_MACHINE.open(keyPath);
key.close(); key.close();
return true; return true;
} catch (e) { } catch (e) {
@@ -26,7 +26,7 @@ void doRegisterUrlScheme(String scheme) {
void doUnregisterUrlScheme(String scheme) { void doUnregisterUrlScheme(String scheme) {
if (Util.isWindows()) { if (Util.isWindows()) {
Registry.currentUser.deleteKey('Software\\Classes\\$scheme', recursive: true); CURRENT_USER.removeSubkey('Software\\Classes\\$scheme');
return; return;
} }
@@ -66,8 +66,8 @@ void doUnregisterDefaultTorrentClient() {
if (Util.isWindows()) { if (Util.isWindows()) {
doUnregisterUrlScheme("magnet"); doUnregisterUrlScheme("magnet");
Registry.currentUser.deleteKey(_torrentRegKey, recursive: true); CURRENT_USER.removeSubkey(_torrentRegKey);
Registry.currentUser.deleteKey(_torrentAppRegKey, recursive: true); CURRENT_USER.removeSubkey(_torrentAppRegKey);
return; return;
} }
+14 -12
View File
@@ -3,12 +3,14 @@ import 'package:win32_registry/win32_registry.dart';
/// Check registry key /// Check registry key
/// If the key does not exist or the value is different, return false /// If the key does not exist or the value is different, return false
bool checkRegistry(String keyPath, String valueName, String value) { bool checkRegistry(String keyPath, String valueName, String value) {
RegistryKey regKey; RegistryKey? regKey;
try { try {
regKey = Registry.openPath(RegistryHive.currentUser, path: keyPath); regKey = CURRENT_USER.open(keyPath);
return regKey.getValueAsString(valueName) == value; return regKey.getString(valueName) == value;
} catch (e) { } catch (e) {
return false; return false;
} finally {
regKey?.close();
} }
} }
@@ -16,15 +18,15 @@ bool checkRegistry(String keyPath, String valueName, String value) {
/// If the key does not exist, create it /// If the key does not exist, create it
/// If the value does not exist or is different, update it /// If the value does not exist or is different, update it
void upsertRegistry(String keyPath, String valueName, String value) { void upsertRegistry(String keyPath, String valueName, String value) {
RegistryKey regKey; final regKey = CURRENT_USER.create(
keyPath,
config: const RegistryOpenConfig(access: RegistryAccess.all, create: true),
);
try { try {
regKey = Registry.openPath(RegistryHive.currentUser, path: keyPath, desiredAccessRights: AccessRights.allAccess); if (regKey.getString(valueName) != value) {
} catch (e) { regKey.setValue(valueName, RegistryValue.string(value));
regKey = Registry.currentUser.createKey(keyPath); }
} finally {
regKey.close();
} }
if (regKey.getValueAsString(valueName) != value) {
regKey.createValue(RegistryValue(valueName, RegistryValueType.string, value));
}
regKey.close();
} }
+94 -37
View File
@@ -17,6 +17,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.1" version: "10.0.1"
android_file_picker:
dependency: transitive
description:
name: android_file_picker
sha256: "0d84bb91fb78af33756107f00cf71ee084474169d481b882b335c3006077a913"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
animation_kit: animation_kit:
dependency: transitive dependency: transitive
description: description:
@@ -245,10 +253,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: dart_ipc name: dart_ipc
sha256: "6cad558cda5304017c1f581df4c96fd4f8e4ee212aae7bfa4357716236faa9ba" sha256: "3b372078dcc542b97189da4df2b08c1fc5ab0123ecdce37d400ce85ab651b273"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "2.0.2"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@@ -293,18 +301,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: device_info_plus name: device_info_plus
sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da" sha256: "0891702f96b2e465fe567b7ec448380e6b1c14f60af552a8536d9f583b6b8442"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.3.0" version: "13.2.0"
device_info_plus_platform_interface: device_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: device_info_plus_platform_interface name: device_info_plus_platform_interface
sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f sha256: "04b173a92e2d9161dfead145667037c8d834db725ce2e7b942bfe18fd2f45a46"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.3" version: "8.1.0"
dio: dio:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -361,30 +369,70 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.0" version: "2.2.0"
ffi_leak_tracker:
dependency: transitive
description:
name: ffi_leak_tracker
sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97"
url: "https://pub.dev"
source: hosted
version: "0.1.2"
ffigen: ffigen:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: ffigen name: ffigen
sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a sha256: "56fc0be88937409839a59c133dfdee4165e80da324c9e39f59013060249ffb44"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.0.2" version: "21.0.0"
file: file:
dependency: transitive dependency: transitive
description: description:
name: file name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.4" version: "7.0.1"
file_picker: file_picker:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
sha256: "7423298f08f6fc8cce05792bae329f9a93653fc9c08712831b1a55540127995d" sha256: "0631f51bbc2e1184bdc9e79384db158dc7830e15b3001feeca700e86563f4d24"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.0.2" version: "12.2.0"
file_picker_darwin:
dependency: transitive
description:
name: file_picker_darwin
sha256: "5c32c9400f5c8976c9dd7aa34693c7d2f0c853c28704a1c1409029cb760f5251"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
file_picker_linux:
dependency: transitive
description:
name: file_picker_linux
sha256: bd52ff1e0048f29df95f913c55ad2991c72791d93e6c42241912c4bdee946cb9
url: "https://pub.dev"
source: hosted
version: "1.1.0"
file_picker_platform_interface:
dependency: transitive
description:
name: file_picker_platform_interface
sha256: d35d8cb68446fae921335bb61501d66cb2469d74c8f3103b8c6ccdbe3fe5afd8
url: "https://pub.dev"
source: hosted
version: "3.3.0"
file_picker_web:
dependency: transitive
description:
name: file_picker_web
sha256: "935560a9d29fa6f006f2855addebb88e88d438e13627d4cc24187033c106f227"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@@ -541,14 +589,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.12" version: "1.0.12"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "3854fe5e3bff0b113c658f260b90c95dea17c92db0f2addeac2e343dd9969785"
url: "https://pub.dev"
source: hosted
version: "2.0.35"
flutter_riverpod: flutter_riverpod:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -755,11 +795,12 @@ packages:
launch_at_startup: launch_at_startup:
dependency: "direct main" dependency: "direct main"
description: description:
name: launch_at_startup path: "."
sha256: "1f8a75520913d1038630049e6c44a2575a23ffd28cc8b14fdf37401d1d21de84" ref: "7ac6f842be974aa08dcd21cab6efa66a3749f2b2"
url: "https://pub.dev" resolved-ref: "7ac6f842be974aa08dcd21cab6efa66a3749f2b2"
source: hosted url: "https://github.com/GopeedLab/launch_at_startup.git"
version: "0.3.1" source: git
version: "0.6.0"
leak_tracker: leak_tracker:
dependency: transitive dependency: transitive
description: description:
@@ -856,6 +897,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.0" version: "2.0.0"
native_toolchain_c:
dependency: transitive
description:
name: native_toolchain_c
sha256: f9c168717100ae6d9fee9ffb0be379bf1f8b26b0f6bcbd4fdddcd931993a6a72
url: "https://pub.dev"
source: hosted
version: "0.19.2"
node_preamble: node_preamble:
dependency: transitive dependency: transitive
description: description:
@@ -932,18 +981,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: package_info_plus name: package_info_plus
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" sha256: "127e1751e37ffb2ff4658beeaca77bad0c27bf5f932bd3a501c2296926d4b481"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.3.1" version: "10.2.1"
package_info_plus_platform_interface: package_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_platform_interface name: package_info_plus_platform_interface
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" sha256: db762cb2f4f25ee60fb6359773861b0f199e00b90d237bd85a76a1e806b46ef4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.2.1" version: "4.1.0"
path: path:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1237,18 +1286,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: share_plus name: share_plus
sha256: fce43200aa03ea87b91ce4c3ac79f0cecd52e2a7a56c7a4185023c271fbfa6da sha256: "34f00f9becd2743c1fb05363d624f9f70d37f7ccdcdda47450bc0b8c9d327b8c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.1.4" version: "13.3.0"
share_plus_platform_interface: share_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: share_plus_platform_interface name: share_plus_platform_interface
sha256: cc012a23fc2d479854e6c80150696c4a5f5bb62cb89af4de1c505cf78d0a5d0b sha256: "365ef7379fc22507256adda3385152942ffce08935452bc972c2e52a0bebae41"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.2" version: "7.2.0"
shared_preferences: shared_preferences:
dependency: transitive dependency: transitive
description: description:
@@ -1659,18 +1708,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.15.0" version: "6.4.0"
win32_registry: win32_registry:
dependency: "direct main" dependency: "direct main"
description: description:
name: win32_registry name: win32_registry
sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" sha256: "73b1d78920a9d6e03f8b4e43e612b87bf3152a0e5c5e5150267762b7c4116904"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.5" version: "3.0.3"
window_manager: window_manager:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1679,6 +1728,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.2" version: "0.5.2"
windows_file_picker:
dependency: transitive
description:
name: windows_file_picker
sha256: d999c1c085374724668af0b674a9758d96255c50933faa2ac1cc51eff8308caf
url: "https://pub.dev"
source: hosted
version: "1.2.0"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
+11 -8
View File
@@ -44,21 +44,24 @@ dependencies:
ffi: ^2.1.3 ffi: ^2.1.3
crypto: ^3.0.6 crypto: ^3.0.6
logger: ^1.4.0 logger: ^1.4.0
package_info_plus: ^8.1.0 package_info_plus: ^10.2.1
pub_semver: ^2.2.0 pub_semver: ^2.2.0
device_info_plus: ^11.1.0 device_info_plus: ^13.2.0
win32_registry: ^1.1.5 win32_registry: ^3.0.3
launch_at_startup: ^0.3.1 launch_at_startup:
git:
url: https://github.com/GopeedLab/launch_at_startup.git
ref: 7ac6f842be974aa08dcd21cab6efa66a3749f2b2
app_links: ^6.3.3 app_links: ^6.3.3
share_handler: ^0.0.22 share_handler: ^0.0.22
share_plus: ^10.1.0 share_plus: ^13.3.0
uri_content: ^3.1.3 uri_content: ^3.1.3
dart_ipc: ^1.0.1 dart_ipc: ^2.0.2
flutter_inappwebview: ^6.1.5 flutter_inappwebview: ^6.1.5
flutter_local_notifications: 20.1.0 flutter_local_notifications: 20.1.0
desktop_drop: ^0.4.4 desktop_drop: ^0.4.4
external_path: ^2.2.0 external_path: ^2.2.0
file_picker: 9.0.2 file_picker: 12.2.0
open_dir: ^0.0.2+1 open_dir: ^0.0.2+1
open_filex: ^4.7.0 open_filex: ^4.7.0
permission_handler: ^11.3.1 permission_handler: ^11.3.1
@@ -114,7 +117,7 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # rules and activating additional ones.
flutter_lints: ^6.0.0 flutter_lints: ^6.0.0
ffigen: ^8.0.2 ffigen: ^21.0.0
build_runner: ^2.15.1 build_runner: ^2.15.1
json_serializable: ^6.14.1 json_serializable: ^6.14.1
flutter_launcher_icons: ^0.14.4 flutter_launcher_icons: ^0.14.4