getTitleAsync method

Future<String> getTitleAsync(
  1. AssetEntity entity, {
  2. bool isOrigin = true,
  3. int subtype = 0,
  4. PMDarwinAVFileType? darwinFileType,
})

Implementation

Future<String> getTitleAsync(
  AssetEntity entity, {
  bool isOrigin = true,
  int subtype = 0,
  PMDarwinAVFileType? darwinFileType,
}) async {
  if (Platform.isIOS || Platform.isMacOS) {
    return await _channel.invokeMethod(
      PMConstants.mGetTitleAsync,
      <String, dynamic>{
        'id': entity.id,
        'subtype': subtype,
        'isOrigin': isOrigin,
        'darwinFileType': darwinFileType?.value ?? 0,
      },
    ) as String;
  }
  return entity.title ?? '';
}