url property

String get url

Returns the URL of the asset, considering cache settings.

The cache policy determines how the URL is constructed:

Implementation

String get url {
  if (cache == AssetCache.never) {
    return rq.url(
      _path,
      params: {
        'vr': "v1.${DateTime.now().millisecondsSinceEpoch}",
      },
    );
  } else if (cache == AssetCache.appVersion) {
    return rq.url(
      _path,
      params: {
        'vr': "v${WaServer.config.version}",
      },
    );
  } else {
    return rq.url(_path);
  }
}