fromId static method

Future<AssetPathEntity> fromId(
  1. String id, {
  2. FilterOptionGroup? filterOption,
  3. RequestType type = RequestType.common,
  4. int albumType = 1,
})

Obtained by AssetPathEntity.id, not recommended

Implementation

static Future<AssetPathEntity> fromId(
  String id, {
  FilterOptionGroup? filterOption,
  RequestType type = RequestType.common,
  int albumType = 1,
}) async {
  assert(albumType == 1 || Platform.isIOS || Platform.isMacOS);
  filterOption ??= FilterOptionGroup();
  final entity = AssetPathEntity()
    ..id = id
    ..filterOption = filterOption
    ..typeInt = type.index
    ..albumType = 1;
  await entity.refreshPathProperties();
  return entity;
}