Skip to main content

gal 3.0.1 copy "gal: ^3.0.1" to clipboard
gal: ^3.0.1 copied to clipboard

Flutter plugin to save images and videos to the photo gallery, with albums and permission handling.

3.0.1 #

  • Reduce the package size by 88%, from 248 KB to 30 KB, by leaving the platform folders and assets of the example out of the published package #379
  • On Android 10 and later, throw notSupportedFormat instead of unexpected when MediaStore rejects the file type, such as a .jpg file passed to putVideo #376
  • Fix the MIME type of uppercase extensions such as .HEIC on Android when the device language is Turkish or Azerbaijani #376
  • Set the version of the podspec and the Android library to the package version instead of 1.0.0 and 1.0, and take the summary and homepage of the podspec from the pubspec #380

3.0.0 #

  • BREAKING CHANGE: Rename Gal.hasAccess and Gal.requestAccess to Gal.hasPermission and Gal.requestPermission #303
  • BREAKING CHANGE: Rename GalExceptionType.accessDenied to GalExceptionType.permissionDenied, and its code ACCESS_DENIED to PERMISSION_DENIED #356
  • BREAKING CHANGE: Replace GalException.fromCode with GalException.fromPlatformException #303
  • BREAKING CHANGE: Require Flutter 3.41, Dart 3.11, iOS 13 and Android API 24 #352
  • BREAKING CHANGE: On Android 10 and later, putImage and putVideo keep the last-modified time of the source file, so media without an embedded date appears at that date in galleries #331
  • BREAKING CHANGE: On Android, putImageBytes rejects TIFF and TIFF-based camera RAW, which were saved as .tif, and unsupported bytes fail with notSupportedFormat instead of unexpected #347
  • BREAKING CHANGE: Throw unexpected instead of notSupportedFormat when the file does not exist on Android and iOS, and for the PhotoKit identifier errors on iOS and macOS. A missing file now throws unexpected on every platform #364
  • Add the FlutterFramework dependency for Swift Package Manager #352
  • Export GalPlatform in package:gal/gal_platform_interface.dart, so tests can replace Gal #357
  • Support dart fix for the renamed Gal.hasPermission and Gal.requestPermission #363
  • Save WebP, HEIC and AVIF with putImageBytes on Android, and remove the commons-imaging dependency #347
  • Fix PNG saved as image.png.jpg on Android 10 #338
  • Fix Gal.open showing a missing image on Samsung Gallery #259
  • Fix the put- methods never completing on Android 7 to 10 when they are called at the same time without permission, or when the permission dialog is canceled #365
  • Fix the Gradle 10 deprecation warning of Android build.gradle #334
  • Fix the AGP warning about the package attribute of the Android manifest #358
  • Show the code and message of GalException.platformException in GalException.toString #360
  • Fix the wording of GalExceptionType.notSupportedFormat.message #359

Migration #

dart fix --apply renames hasAccess and requestAccess.

// 2.x
await Gal.hasAccess(toAlbum: true);
await Gal.requestAccess(toAlbum: true);
if (e.type == GalExceptionType.accessDenied) {}

// 3.0.0
await Gal.hasPermission(toAlbum: true);
await Gal.requestPermission(toAlbum: true);
if (e.type == GalExceptionType.permissionDenied) {}

2.3.3 #

  • Fix Windows build on latest MSVC by removing /await flag #324

2.3.2 #

  • Reduce package size by optimizing assets (.pubignore) #296
  • Fix Windows build by adding windowsapp library linking for WinRT support #284

2.3.1 #

  • Add Swift Package Manager support. #242
  • Add PrivacyInfo.xcprivacy for Apple's Privacy Manifests. #242

2.3.0 #

  • Add name parameter to putImageBytes. #205

2.2.3 #

  • Fix error when saving the same file name 32 times on Android. #199

2.2.2 #

  • Fix analytics issue

2.2.1 #

  • UPDATE: Gradle settings to latest #196

2.2.0 #

  • ADD: PlatformInterface #180
  • FIX: package download size 1MB to 0.5MB #181

2.1.4 #

  • FIX: package download size 6MB to 1MB #175

2.1.3 #

  • FIX: Compilation error on Windows in some environments #166

2.1.2 #

  • UPDATE: document comments #158
  • UPDATE: metadata for pub.dev #158

2.1.1 #

  • UPDATE: putImageBytes for Improving performance on windows #155
  • FIX: putImageBytes for saving .tiff on windows #154

2.1.0 #

  • ADD: windows support #148

2.0.0 #

  • ADD: macOS support #142
  • BREAKING CHANGE: flutter: '>=3.3.0' to flutter: '>=3.7.0' #142
  • BREAKING CHANGE: GalException.error to GalException.platformException #143
  • BREAKING CHANGE: Remove GalExceptionType.notHandle (had marked deprecated) #144

1.9.1 #

  • FIX: album option is not working on Android API 29 #130
  • UPDATE: Permission behavior in Android API 29 with album option #133

1.9.0 #

  • ADD: Support for AGP 8 #118

1.8.6 #

  • UPDATE: Keep file name when saving #115
  • UPDATE: README.md

1.8.5 #

  • UPDATE: putImageBytes in iOS to get metadata

1.8.4 #

  • FIX: file auto conversion #105

1.8.3 #

  • FIX: dart format

1.8.2 #

  • FIX: put- does not run with Future #96
  • FIX: put- with album and user selects 'selected photos' in permission dialog #95
  • ADD: requestAccess when called put- #97

1.8.1 #

  • REMOVE: plugin_platform_interface #84
  • FIX: example with toAlbum
  • UPDATE: example in readme
  • UPDATE: assets in example
  • UPDATE: GalException error messages

1.8.0 #

  • FEAT: Gal supports album option for saving medias. iOS needs additional permission settings, see latest README or wiki.

1.7.0 #

  • ADD: Support Android API 21-23.

1.6.3 #

  • FIX: Crashing on permission requests for other packages.

1.6.2 #

  • FIX: Returning false when permission granted by default when calling hasAccess(),requestAccess() in Android.
  • UPDATE: Include maxSdkVersion as a key to write in AndroidManifest. *It is not necessary, but it is recommended.

1.6.1 #

  • UPDATE: We have made a stronger typing. Gal,GalException,MethodChannelGal has @immutable now.
  • UPDATE: update README.

1.6.0 #

  • UPDATE: Significantly improved error handling for low iOS versions. As a result, GalExceptionType.notHandle is now @Deprecated and will be removed in the next major version.

1.5.0 #

  • FEAT: Add putImageBytes(). This allows saving image from memory.

1.4.1 #

  • UPDATE: update README.

1.4.0 #

  • UPDATE: Galis final now.
  • UPDATE: add export file.
  • UPDATE: add ios NOT_SUPPORTED_FORMAT condition.

1.3.6 #

  • UPDATE: add error info on throw.
  • UPDATE: clean up native codes.
  • UPDATE: update README.

1.3.5 #

  • UPDATE: fix example.
  • UPDATE: update README.

1.3.4 #

  • UPDATE: update code docs.
  • UPDATE: update README.

1.3.3 #

  • FIX: fix README

1.3.2 #

  • FIX: remove android:requestLegacyExternalStorage="true"

1.3.1 #

  • FIX: fix README
  • UPDATE: make gal constractor private

1.3.0 #

  • FEAT: Add permissionhandlings. Now you can use hasAccess(),requestAccess().

1.2.0 #

  • UPDATE: remove url_launcher and android_intent_plus

1.1.2 #

  • FIX: fix README

1.1.1 #

  • UPDATE: add examples

1.1.0 #

  • FEAT: add error handlings

1.0.7 #

  • UPDATE: transfer repo

1.0.6 #

  • UPDATE: update README

1.0.5 #

  • FIX: refactor

1.0.4 #

  • FIX: update README

1.0.3 #

  • FIX: update README

1.0.2 #

  • FIX: update README

1.0.1 #

  • FIX: update README

1.0.0 #

  • FEAT: saving image

0.0.5 #

  • UPDATE: update README

0.0.4 #

  • FIX: fix CHANGELOG

0.0.3 #

  • UPDATE: dartdoc comments

0.0.2 #

  • UPDATE: update description field of pubspec.yaml

0.0.1 #

  • Initial Release
600
likes
160
points
809k
downloads

Documentation

Documentation
API reference

Publisher

verified publishermidoridesign.studio

Weekly Downloads

Flutter plugin to save images and videos to the photo gallery, with albums and permission handling.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#gallery #video #image #photos #util

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on gal

Packages that implement gal