fromId static method

Future<AssetEntity?> fromId(
  1. String id
)

Obtain an entity from ID.

This method is not recommend in general, since the corresponding asset could be deleted in anytime, which will cause properties invalid.

Implementation

static Future<AssetEntity?> fromId(String id) async {
  try {
    return await _obtainAssetFromId(id);
  } catch (e) {
    return null;
  }
}