diff --git a/lib/photo_gallery.dart b/lib/photo_gallery.dart index af722c2..6217f0c 100644 --- a/lib/photo_gallery.dart +++ b/lib/photo_gallery.dart @@ -18,7 +18,7 @@ part 'src/models/medium.dart'; /// Accessing the native photo gallery. class PhotoGallery { - static const MethodChannel _channel = const MethodChannel('photo_gallery'); + static const MethodChannel _channel = MethodChannel('photo_gallery'); /// List all available gallery albums and counts number of items of [MediumType]. static Future> listAlbums({ @@ -80,7 +80,7 @@ class PhotoGallery { 'highQuality': highQuality, }); if (bytes == null) throw "Failed to fetch thumbnail of medium $mediumId"; - return new List.from(bytes); + return List.from(bytes); } /// Get album thumbnail by album id @@ -101,7 +101,7 @@ class PhotoGallery { 'highQuality': highQuality, }); if (bytes == null) throw "Failed to fetch thumbnail of album $albumId"; - return new List.from(bytes); + return List.from(bytes); } /// get medium file by medium id diff --git a/lib/src/models/album.dart b/lib/src/models/album.dart index 5bf22dc..bd12cda 100644 --- a/lib/src/models/album.dart +++ b/lib/src/models/album.dart @@ -56,7 +56,7 @@ class Album { }) { return PhotoGallery.getAlbumThumbnail( albumId: id, - mediumType: this.mediumType, + mediumType: mediumType, width: width, height: height, highQuality: highQuality,