From 8126b49f702a1f7c574086241440679f80dfca43 Mon Sep 17 00:00:00 2001 From: Hassan Ansari Date: Mon, 19 Aug 2024 00:46:26 +0530 Subject: [PATCH] Minor upgrades --- .github/workflows/publish.yml | 14 +++++++ CHANGELOG.md | 8 ++++ example/lib/save_with_byte_proxy.dart | 6 ++- example/lib/save_with_file_proxy.dart | 2 +- example/pubspec.lock | 50 ++++++++++++++---------- pubspec.lock | 56 +++++++++++++-------------- pubspec.yaml | 10 ++--- 7 files changed, 89 insertions(+), 57 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f9561fa..2afa050 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,20 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+[0-9]' jobs: + add-contributors: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: BobAnkh/add-contributors@master + with: + CONTRIBUTOR: '### Contributors' + COLUMN_PER_ROW: '6' + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + IMG_WIDTH: '100' + FONT_SIZE: '14' + PATH: '/README.md' + COMMIT_MESSAGE: 'docs(README): update contributors' + AVATAR_SHAPE: 'round' publish: permissions: id-token: write diff --git a/CHANGELOG.md b/CHANGELOG.md index f018c6f..65deecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## [0.2.14] + * Merged PR [#117](https://github.com/incrediblezayed/file_saver/pull/117) to update conditional imports for web (wasm) + * Merged PR [#121](https://github.com/incrediblezayed/file_saver/pull/121) added dynamic access to enum for whoever need it, + ```dart + MimeType.get('pdf'); + ``` + * Merged PR [#123](https://github.com/incrediblezayed/file_saver/pull/123) for upgrade to web 1.0.0 + ## [0.2.13] * Merge PR [#115](https://github.com/incrediblezayed/file_saver/pull/115) for wasm build * Added 3 MP4 mime types for better compatibility with the MP4 files diff --git a/example/lib/save_with_byte_proxy.dart b/example/lib/save_with_byte_proxy.dart index 49dc650..54d6071 100644 --- a/example/lib/save_with_byte_proxy.dart +++ b/example/lib/save_with_byte_proxy.dart @@ -99,12 +99,14 @@ class _SaveWithByteProxyState extends State { if (!status) await Permission.storage.request(); } } - if (type != MimeType.other && extController.text.isEmpty) { + if (type != MimeType.other && + extController.text.isEmpty && + context.mounted) { ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text("Extension is required"))); } - if (linkController.text.isEmpty) { + if (linkController.text.isEmpty && context.mounted) { ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text("Link is required"))); } diff --git a/example/lib/save_with_file_proxy.dart b/example/lib/save_with_file_proxy.dart index 6b4b113..e839a4b 100644 --- a/example/lib/save_with_file_proxy.dart +++ b/example/lib/save_with_file_proxy.dart @@ -104,7 +104,7 @@ class _SaveWithFileProxyState extends State { if (!status) await Permission.storage.request(); } } - if (type != MimeType.other && extController.text.isEmpty) { + if (type != MimeType.other && extController.text.isEmpty && context.mounted) { ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text("Extension is required"))); } diff --git a/example/pubspec.lock b/example/pubspec.lock index f154c3f..1c08482 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -77,10 +77,18 @@ packages: dependency: transitive description: name: dio - sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" + sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" url: "https://pub.dev" source: hosted - version: "5.4.3+1" + version: "5.6.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" equatable: dependency: transitive description: @@ -127,7 +135,7 @@ packages: path: ".." relative: true source: path - version: "0.2.13" + version: "0.2.14" flutter: dependency: "direct main" description: flutter @@ -179,18 +187,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -219,18 +227,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" path: dependency: transitive description: @@ -243,10 +251,10 @@ packages: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -283,10 +291,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" permission_handler: dependency: "direct main" description: @@ -416,10 +424,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: @@ -440,18 +448,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.0" win32: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index 67cbd82..1c3e1bf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,10 +45,18 @@ packages: dependency: "direct main" description: name: dio - sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" + sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" url: "https://pub.dev" source: hosted - version: "5.4.3+1" + version: "5.6.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" fake_async: dependency: transitive description: @@ -100,18 +108,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -140,18 +148,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" path: dependency: transitive description: @@ -164,10 +172,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -204,10 +212,10 @@ packages: dependency: "direct main" description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" platform: dependency: transitive description: @@ -273,10 +281,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: @@ -297,26 +305,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" web: dependency: "direct main" description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - win32: - dependency: transitive - description: - name: win32 - sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "5.5.1" + version: "1.0.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2640bfe..6ca9fc2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: file_saver description: >- This package will help you save file with a single method on any platform including macOS, iOS, Android, Windows, Web, Linux. -version: 0.2.13 +version: 0.2.14 repository: https://github.com/incrediblezayed/file_saver homepage: https://hassanansari.dev @@ -11,15 +11,15 @@ environment: flutter: ">=3.0.0" dependencies: + collection: ^1.18.0 + dio: ^5.6.0 flutter: sdk: flutter flutter_web_plugins: sdk: flutter - path_provider: ^2.1.3 - path_provider_windows: ^2.2.1 + path_provider: ^2.1.4 path_provider_linux: ^2.2.1 - dio: ^5.4.3+1 - collection: ^1.18.0 + path_provider_windows: ^2.3.0 web: ^1.0.0 dev_dependencies: