getTitleAsync method

Future<String> getTitleAsync(
  1. AssetEntity entity, {
  2. int subtype = 0,
})

Implementation

Future<String> getTitleAsync(
  AssetEntity entity, {
  int subtype = 0,
}) async {
  assert(Platform.isAndroid || Platform.isIOS || Platform.isMacOS);
  if (Platform.isAndroid) {
    return entity.title!;
  }
  if (Platform.isIOS || Platform.isMacOS) {
    return await _channel.invokeMethod<String>(
      PMConstants.mGetTitleAsync,
      <String, dynamic>{
        'id': entity.id,
        'subtype': subtype,
      },
    ) as String;
  }
  return '';
}