mediaCompress method

void mediaCompress(
  1. List<AssetEntity> itemList,
  2. dynamic compressCallBack(
    1. AssetEntity
    )
)

Implementation

void mediaCompress(List<AssetEntity> itemList, Function(AssetEntity) compressCallBack) async {
  if (!await checkPhotosPermission()) return;
  try {
    _compressCallBack = compressCallBack;
    List<Map<String, dynamic>> mapList = [];
    for (AssetEntity item in itemList) {
      mapList.add(item.toJson());
    }
    _channel.invokeMethod('mediaCompress', mapList);
  } catch (e) {}
  return null;
}