Skip to content

Commit

Permalink
Fix export button
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 7, 2025
1 parent 2c636dd commit 0207378
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
2 changes: 2 additions & 0 deletions app/lib/services/import.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class ImportService {
bytes = Uint8List.fromList(utf8.encode(data));
} else if (data is FileSystemFile<NoteData>) {
bytes = Uint8List.fromList(data.data?.exportAsBytes() ?? []);
} else if (data is FileSystemFile<NoteFile>) {
bytes = Uint8List.fromList(data.data?.data ?? []);
} else if (location != null) {
bytes = await fs.loadAbsolute(location.path);
} else if (data is List) {
Expand Down
6 changes: 3 additions & 3 deletions app/lib/views/files/entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ class ContextFileRegion extends StatelessWidget {
leadingIcon: const PhosphorIcon(PhosphorIconsLight.pencil),
child: Text(AppLocalizations.of(context).rename),
),
if (entity is FileSystemFile<NoteData>)
if (entity is FileSystemFile<NoteFile>)
MenuItemButton(
onPressed: () {
try {
final data = (entity as FileSystemFile<NoteData>).data;
exportData(context, data?.exportAsBytes() ?? []);
final data = (entity as FileSystemFile<NoteFile>).data;
exportData(context, data?.data ?? []);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
Expand Down
6 changes: 3 additions & 3 deletions app/lib/views/files/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ class FileEntityListTile extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
if (entity is FileSystemFile<NoteData>)
if (entity is FileSystemFile<NoteFile>)
IconButton(
onPressed: () {
try {
final data =
(entity as FileSystemFile<NoteData>).data;
exportData(context, data?.exportAsBytes() ?? []);
(entity as FileSystemFile<NoteFile>).data;
exportData(context, data?.data ?? []);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
Expand Down
37 changes: 18 additions & 19 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
10 changes: 2 additions & 8 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions metadata/en-US/changelogs/129.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0207378

Please sign in to comment.