diff --git a/app/lib/services/import.dart b/app/lib/services/import.dart index 3490da121f0d..35c15efccc9c 100644 --- a/app/lib/services/import.dart +++ b/app/lib/services/import.dart @@ -82,6 +82,8 @@ class ImportService { bytes = Uint8List.fromList(utf8.encode(data)); } else if (data is FileSystemFile) { bytes = Uint8List.fromList(data.data?.exportAsBytes() ?? []); + } else if (data is FileSystemFile) { + bytes = Uint8List.fromList(data.data?.data ?? []); } else if (location != null) { bytes = await fs.loadAbsolute(location.path); } else if (data is List) { diff --git a/app/lib/views/files/entity.dart b/app/lib/views/files/entity.dart index f38866d1e8cf..db59db0f0d44 100644 --- a/app/lib/views/files/entity.dart +++ b/app/lib/views/files/entity.dart @@ -334,12 +334,12 @@ class ContextFileRegion extends StatelessWidget { leadingIcon: const PhosphorIcon(PhosphorIconsLight.pencil), child: Text(AppLocalizations.of(context).rename), ), - if (entity is FileSystemFile) + if (entity is FileSystemFile) MenuItemButton( onPressed: () { try { - final data = (entity as FileSystemFile).data; - exportData(context, data?.exportAsBytes() ?? []); + final data = (entity as FileSystemFile).data; + exportData(context, data?.data ?? []); } catch (e) { ScaffoldMessenger.of(context).showSnackBar( SnackBar( diff --git a/app/lib/views/files/list.dart b/app/lib/views/files/list.dart index 5cf252229a7e..ee758b42db3f 100644 --- a/app/lib/views/files/list.dart +++ b/app/lib/views/files/list.dart @@ -391,13 +391,13 @@ class FileEntityListTile extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, mainAxisSize: MainAxisSize.min, children: [ - if (entity is FileSystemFile) + if (entity is FileSystemFile) IconButton( onPressed: () { try { final data = - (entity as FileSystemFile).data; - exportData(context, data?.exportAsBytes() ?? []); + (entity as FileSystemFile).data; + exportData(context, data?.data ?? []); } catch (e) { ScaffoldMessenger.of(context).showSnackBar( SnackBar( diff --git a/app/pubspec.lock b/app/pubspec.lock index 193b99e511b9..cb78650bb150 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -521,51 +521,50 @@ packages: dependency: "direct main" description: name: flutter_secure_storage - sha256: "1913841ac4c7bf57cd2e05b717e1fbff7841b542962feff827b16525a781b3e4" + sha256: c0f1abb088adddc193286ea91eedd71900ec5707ac86503a7ae09d88c9ffc22b url: "https://pub.dev" source: hosted - version: "9.2.3" + version: "10.0.0-beta.2" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705 + sha256: b777e220fbf21c149574aa31f9e4ed56dcf025c4ef196664fe90954c265105dc url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "2.0.0" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" + sha256: "75894eb6b402ac7f7f5ee5487d651b87855a338e26eb6993f4b2fce33013a615" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "4.0.0" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + sha256: "8ceea1223bee3c6ac1a22dabd8feefc550e4729b3675de4b5900f55afcb435d6" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "2.0.1" flutter_secure_storage_web: - dependency: "direct overridden" + dependency: transitive description: - path: flutter_secure_storage_web - ref: "1d7b32bde7910bc2ffd1db5245ee0b2478ff4b7d" - resolved-ref: "1d7b32bde7910bc2ffd1db5245ee0b2478ff4b7d" - url: "https://github.com/CodeDoctorDE/flutter_secure_storage.git" - source: git - version: "2.0.0-beta.1" + name: flutter_secure_storage_web + sha256: "4c3f233e739545c6cb09286eeec1cc4744138372b985113acc904f7263bef517" + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 + sha256: ff32af20f70a8d0e59b2938fc92de35b54a74671041c814275afd80e27df9f21 url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" flutter_svg: dependency: "direct main" description: @@ -782,8 +781,8 @@ packages: dependency: "direct main" description: path: "packages/lw_file_system" - ref: "742b507106900b65490551d42a2ef4c7d049889a" - resolved-ref: "742b507106900b65490551d42a2ef4c7d049889a" + ref: "760972dc351ab9aecd3df37e8679b2b029f34e80" + resolved-ref: "760972dc351ab9aecd3df37e8679b2b029f34e80" url: "https://github.com/LinwoodDev/dart_pkgs" source: git version: "1.0.0" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 1f8e7bbd2878..1585457a067f 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -60,7 +60,7 @@ dependencies: ref: 4be45bf7000640f38cb62088899a0f5185b4dc89 path: pdf http: ^1.2.1 - flutter_secure_storage: ^9.0.0 + flutter_secure_storage: ^10.0.0-beta.2 equatable: ^2.0.5 rxdart: ^0.28.0 archive: ^4.0.0 @@ -99,7 +99,7 @@ dependencies: lw_file_system: git: url: https://github.com/LinwoodDev/dart_pkgs - ref: 742b507106900b65490551d42a2ef4c7d049889a + ref: 760972dc351ab9aecd3df37e8679b2b029f34e80 path: packages/lw_file_system flutter_localized_locales: ^2.0.5 dynamic_color: ^1.7.0 @@ -120,12 +120,6 @@ dev_dependencies: build_runner: ^2.4.9 json_serializable: ^6.7.1 freezed: ^2.5.2 -dependency_overrides: - flutter_secure_storage_web: - git: - url: https://github.com/CodeDoctorDE/flutter_secure_storage.git - path: flutter_secure_storage_web - ref: 1d7b32bde7910bc2ffd1db5245ee0b2478ff4b7d # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter. diff --git a/metadata/en-US/changelogs/129.txt b/metadata/en-US/changelogs/129.txt new file mode 100644 index 000000000000..2c4ae44eca74 --- /dev/null +++ b/metadata/en-US/changelogs/129.txt @@ -0,0 +1,5 @@ +* Fix export button in data settings not working +* Fix export button for file view not visible +* Update secure storage dependency + +Read more here: https://linwood.dev/butterfly/2.3.0-beta.0 \ No newline at end of file