Skip to content

Commit

Permalink
Update ChangeLog & pubspec yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
incrediblezayed committed May 26, 2024
1 parent 6f7a3e0 commit 6529f15
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: "3.19.1"
flutter-version: "3.22.0"
- name: Set up Dart
uses: dart-lang/setup-dart@v1
- name: Get dependencies
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [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

## [0.2.12]
* Minor network related bug fixes, fixing issue [#105](https://github.com/incrediblezayed/file_saver/issues/105)
* & Issue [#106](https://github.com/incrediblezayed/file_saver/issues/106)
Expand Down
6 changes: 4 additions & 2 deletions example/lib/save_with_byte_proxy.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:developer';
import 'dart:io';

import 'package:excel/excel.dart';
import 'package:file_saver/file_saver.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';

class SaveWithByteProxy extends StatefulWidget {
const SaveWithByteProxy({Key? key}) : super(key: key);
Expand Down Expand Up @@ -91,11 +93,11 @@ class _SaveWithByteProxyState extends State<SaveWithByteProxy> {
ElevatedButton(
onPressed: () async {
if (!kIsWeb) {
/* if (Platform.isIOS || Platform.isAndroid) {
if (Platform.isIOS || Platform.isAndroid) {
bool status = await Permission.storage.isGranted;

if (!status) await Permission.storage.request();
} */
}
}
if (type != MimeType.other && extController.text.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
Expand Down
20 changes: 17 additions & 3 deletions example/lib/save_with_file_proxy.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:developer';
import 'dart:io';

import 'package:file_picker/file_picker.dart';
import 'package:file_saver/file_saver.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';

class SaveWithFileProxy extends StatefulWidget {
const SaveWithFileProxy({Key? key}) : super(key: key);
Expand Down Expand Up @@ -49,7 +51,19 @@ class _SaveWithFileProxyState extends State<SaveWithFileProxy> {
labelText: "Original file",
border: const OutlineInputBorder(),
suffixIcon: IconButton(
onPressed: () async {},
onPressed: () async {
FilePickerResult? result =
await FilePicker.platform.pickFiles();

final resultPath = result?.files.single.path;

if (resultPath != null) {
File file = File(resultPath);
originalFileController.text = file.path;
} else {
// User canceled the picker
}
},
icon: const Icon(Icons.folder),
),
),
Expand Down Expand Up @@ -84,11 +98,11 @@ class _SaveWithFileProxyState extends State<SaveWithFileProxy> {
child: ElevatedButton(
onPressed: () async {
if (!kIsWeb) {
/* if (Platform.isIOS || Platform.isAndroid) {
if (Platform.isIOS || Platform.isAndroid) {
bool status = await Permission.storage.isGranted;

if (!status) await Permission.storage.request();
} */
}
}
if (type != MimeType.other && extController.text.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
Expand Down
66 changes: 65 additions & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,21 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: be325344c1f3070354a1d84a231a1ba75ea85d413774ec4bdf444c023342e030
url: "https://pub.dev"
source: hosted
version: "5.5.0"
file_saver:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.2.12"
version: "0.2.13"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -133,6 +141,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
url: "https://pub.dev"
source: hosted
version: "2.0.19"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -271,6 +287,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.1"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
url: "https://pub.dev"
source: hosted
version: "11.3.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5"
url: "https://pub.dev"
source: hosted
version: "12.0.6"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662
url: "https://pub.dev"
source: hosted
version: "9.4.4"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies:
flutter:
sdk: flutter
excel:
#file_picker: ^5.5.0
file_picker: ^5.5.0
file_saver:
path: ../
cupertino_icons: ^1.0.8
#permission_handler:
permission_handler:

dev_dependencies:
flutter_test:
Expand Down
3 changes: 3 additions & 0 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
#include "generated_plugin_registrant.h"

#include <file_saver/file_saver_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSaverPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSaverPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
}
1 change: 1 addition & 0 deletions example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
file_saver
permission_handler_windows
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.12
version: 0.2.13
repository: https://github.com/incrediblezayed/file_saver
homepage: https://hassanansari.dev

Expand Down

0 comments on commit 6529f15

Please sign in to comment.