From 03b0e8df3b127fa1423f80fb0faa033aaf844806 Mon Sep 17 00:00:00 2001 From: yuoohama Date: Sun, 6 Aug 2023 11:41:01 +0900 Subject: [PATCH] Update gal.dart --- lib/src/gal.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/src/gal.dart b/lib/src/gal.dart index e66032dd..0a78f795 100644 --- a/lib/src/gal.dart +++ b/lib/src/gal.dart @@ -20,7 +20,8 @@ final class Gal { /// if an error occurs during saving. /// See: [Formats](https://github.com/natsuk4ze/gal/wiki/Formats) static Future putVideo(String path, {String? album}) async => - _voidOrThrow(() async => GalPlatform.instance.putVideo(path)); + _voidOrThrow( + () async => GalPlatform.instance.putVideo(path, album: album)); /// Save a image to the gallery from file [path]. /// @@ -28,7 +29,8 @@ final class Gal { /// if an error occurs during saving. /// See: [Formats](https://github.com/natsuk4ze/gal/wiki/Formats) static Future putImage(String path, {String? album}) async => - _voidOrThrow(() async => GalPlatform.instance.putImage(path)); + _voidOrThrow( + () async => GalPlatform.instance.putImage(path, album: album)); /// Save a image to the gallery from [Uint8List]. /// @@ -37,7 +39,8 @@ final class Gal { /// if an error occurs during saving. /// See: [Formats](https://github.com/natsuk4ze/gal/wiki/Formats) static Future putImageBytes(Uint8List bytes, {String? album}) async => - _voidOrThrow(() async => GalPlatform.instance.putImageBytes(bytes)); + _voidOrThrow( + () async => GalPlatform.instance.putImageBytes(bytes, album: album)); /// Open gallery app. ///