remove unnecessary 'const', 'new' keyword and 'this.' qualifier.
This commit is contained in:
parent
1b9f6a0de0
commit
c152bb6bbd
@ -18,7 +18,7 @@ part 'src/models/medium.dart';
|
|||||||
|
|
||||||
/// Accessing the native photo gallery.
|
/// Accessing the native photo gallery.
|
||||||
class PhotoGallery {
|
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].
|
/// List all available gallery albums and counts number of items of [MediumType].
|
||||||
static Future<List<Album>> listAlbums({
|
static Future<List<Album>> listAlbums({
|
||||||
@ -80,7 +80,7 @@ class PhotoGallery {
|
|||||||
'highQuality': highQuality,
|
'highQuality': highQuality,
|
||||||
});
|
});
|
||||||
if (bytes == null) throw "Failed to fetch thumbnail of medium $mediumId";
|
if (bytes == null) throw "Failed to fetch thumbnail of medium $mediumId";
|
||||||
return new List<int>.from(bytes);
|
return List<int>.from(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get album thumbnail by album id
|
/// Get album thumbnail by album id
|
||||||
@ -101,7 +101,7 @@ class PhotoGallery {
|
|||||||
'highQuality': highQuality,
|
'highQuality': highQuality,
|
||||||
});
|
});
|
||||||
if (bytes == null) throw "Failed to fetch thumbnail of album $albumId";
|
if (bytes == null) throw "Failed to fetch thumbnail of album $albumId";
|
||||||
return new List<int>.from(bytes);
|
return List<int>.from(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get medium file by medium id
|
/// get medium file by medium id
|
||||||
|
@ -56,7 +56,7 @@ class Album {
|
|||||||
}) {
|
}) {
|
||||||
return PhotoGallery.getAlbumThumbnail(
|
return PhotoGallery.getAlbumThumbnail(
|
||||||
albumId: id,
|
albumId: id,
|
||||||
mediumType: this.mediumType,
|
mediumType: mediumType,
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
highQuality: highQuality,
|
highQuality: highQuality,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user