upgrade deps

This commit is contained in:
Fabian Freund
2026-05-22 19:25:19 +02:00
parent ee99d28379
commit fd53d77d14
6 changed files with 12 additions and 21 deletions
@@ -1678,7 +1678,7 @@ class _ExportExpansion extends ConsumerWidget {
fileName, fileName,
) async { ) async {
await FilePicker.saveFile( await FilePicker.saveFile(
fileName: fileName, fileName: fileName ?? 'page',
type: FileType.custom, type: FileType.custom,
allowedExtensions: ['md'], allowedExtensions: ['md'],
bytes: utf8.encode(content), bytes: utf8.encode(content),
@@ -599,7 +599,7 @@ class TabMenu extends HookConsumerWidget {
icon: const Icon(MdiIcons.languageMarkdown), icon: const Icon(MdiIcons.languageMarkdown),
shareMarkdownAction: (content, fileName) async { shareMarkdownAction: (content, fileName) async {
await FilePicker.saveFile( await FilePicker.saveFile(
fileName: fileName, fileName: fileName ?? 'page',
type: FileType.custom, type: FileType.custom,
allowedExtensions: ['md'], allowedExtensions: ['md'],
bytes: utf8.encode(content), bytes: utf8.encode(content),
@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart'; import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
@@ -160,15 +159,8 @@ class ProxyInputConsumer extends _$ProxyInputConsumer {
} }
Future<String> _readFileText(PlatformFile file) async { Future<String> _readFileText(PlatformFile file) async {
final bytes = file.bytes; final bytes = await file.readAsBytes();
if (bytes != null) { return utf8.decode(bytes, allowMalformed: true);
return utf8.decode(bytes, allowMalformed: true);
}
final path = file.path;
if (path == null) {
throw const FormatException('Unable to read file contents.');
}
return File(path).readAsString();
} }
@override @override
@@ -301,8 +301,7 @@ Future<AddProxyAction?> _consumeFile(
WidgetRef ref, WidgetRef ref,
ProxyFileImportKind kind, ProxyFileImportKind kind,
) async { ) async {
final result = await FilePicker.pickFiles(withData: true); final picked = await FilePicker.pickFile();
final picked = result?.files.singleOrNull;
if (picked == null) return null; if (picked == null) return null;
final outcome = await ref final outcome = await ref
+6 -6
View File
@@ -17,7 +17,7 @@ dependencies:
country_flags: ^4.1.2 country_flags: ^4.1.2
crypto: ^3.0.7 crypto: ^3.0.7
cryptography_flutter: ^2.3.4 cryptography_flutter: ^2.3.4
device_info_plus: ^12.4.0 device_info_plus: ^13.1.0
drift: ^2.31.0 drift: ^2.31.0
drift_dev: ^2.31.0 drift_dev: ^2.31.0
dynamic_color: ^1.8.1 dynamic_color: ^1.8.1
@@ -25,7 +25,7 @@ dependencies:
fading_scroll: ^0.9.1 fading_scroll: ^0.9.1
fancy_password_field: ^2.0.8 fancy_password_field: ^2.0.8
fast_equatable: ^1.3.1 fast_equatable: ^1.3.1
file_picker: ^11.0.2 file_picker: ^12.0.0-beta.4
flutter: flutter:
sdk: flutter sdk: flutter
flutter_auto_size_text: ^5.0.0 flutter_auto_size_text: ^5.0.0
@@ -35,7 +35,7 @@ dependencies:
flutter_mozilla_components: flutter_mozilla_components:
path: ../../packages/flutter_mozilla_components path: ../../packages/flutter_mozilla_components
flutter_reorderable_grid_view: ^5.6.0 flutter_reorderable_grid_view: ^5.6.0
flutter_secure_storage: ^10.1.0 flutter_secure_storage: ^10.2.0
flutter_singbox_proxy: flutter_singbox_proxy:
path: ../../packages/flutter_singbox_proxy path: ../../packages/flutter_singbox_proxy
flutter_slidable: ^4.0.3 flutter_slidable: ^4.0.3
@@ -62,7 +62,7 @@ dependencies:
material_color_utilities: ^0.13.0 material_color_utilities: ^0.13.0
mime: ^2.0.0 mime: ^2.0.0
nullability: ^1.0.0 nullability: ^1.0.0
package_info_plus: ^9.0.1 package_info_plus: ^10.1.0
path: ^1.9.1 path: ^1.9.1
path_provider: ^2.1.5 path_provider: ^2.1.5
permission_handler: ^12.0.1 permission_handler: ^12.0.1
@@ -76,7 +76,7 @@ dependencies:
rss_dart: ^1.0.14 rss_dart: ^1.0.14
rxdart: ^0.28.0 rxdart: ^0.28.0
saf_stream: ^2.0.0 saf_stream: ^2.0.0
saf_util: ^2.1.0 saf_util: ^2.2.0
search_client: search_client:
path: ../../../weblibre_account/packages/search_client path: ../../../weblibre_account/packages/search_client
search_protocol: search_protocol:
@@ -86,7 +86,7 @@ dependencies:
url: https://github.com/FaFre/secure_archive.git url: https://github.com/FaFre/secure_archive.git
path: packages/secure_archive path: packages/secure_archive
ref: 0c515813ac2d29e29ab1c66759a396af825bf8b3 ref: 0c515813ac2d29e29ab1c66759a396af825bf8b3
share_plus: ^12.0.2 share_plus: ^13.1.0
simple_intent_receiver: simple_intent_receiver:
path: ../../packages/simple_intent_receiver path: ../../packages/simple_intent_receiver
skeletonizer: ^2.1.3 skeletonizer: ^2.1.3
@@ -15,7 +15,7 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer # the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`. # versions available, run `flutter pub outdated`.
dependencies: dependencies:
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.9
flutter: flutter:
sdk: flutter sdk: flutter