getAsset static method

Future<ByteData?> getAsset(
  1. String key
)

Implementation

static Future<ByteData?> getAsset(String key) async{
  ByteData? backupAsset = null;
  if(_assetChannels.isNotEmpty){
    for(var channel in _assetChannels.values){
      final ass = await channel(key);
      if(ass != null){
        backupAsset = ass;
        break;
      }
    }
  }
  return backupAsset;
}