fetchPathProperties method

Future<AssetPathEntity?> fetchPathProperties({
  1. FilterOptionGroup? filterOptionGroup,
})

Obtain a new AssetPathEntity from the current one with refreshed properties.

Implementation

Future<AssetPathEntity?> fetchPathProperties({
  FilterOptionGroup? filterOptionGroup,
}) async {
  final Map<dynamic, dynamic>? result = await plugin.fetchPathProperties(
    id,
    type,
    filterOptionGroup ?? filterOption,
  );
  if (result == null) {
    return null;
  }
  final Object? list = result['data'];
  if (list is List && list.isNotEmpty) {
    return ConvertUtils.convertToPathList(
      result.cast<String, dynamic>(),
      type: type,
      filterOption: filterOptionGroup ?? filterOption,
    ).first;
  }
  return null;
}