openAlbumOfMultiple method

Future<List<AssetEntity>> openAlbumOfMultiple()

选择多张图片,返回原图路径

Implementation

Future<List<AssetEntity>> openAlbumOfMultiple() async {
  if (!await checkPhotosPermission()) return null;
  try {
    var result = await _channel.invokeMethod('openAlbum', albumTypeMultiple);
    if (result is List && result.isNotEmpty) {
      List<AssetEntity> itemList = [];
      for (var tempItem in result) {
        itemList.add(AssetEntity.fromJson(Map<String, dynamic>.from(tempItem)));
      }
      return itemList;
    }
  } catch (e) {}
  return null;
}