CdnAsset class

An asset, most commonly an image, on Discord's CDN.

Implementers

Constructors

CdnAsset({required Nyxx client, required HttpRoute base, required String hash, CdnFormat? defaultFormat, bool? isAnimated})
An asset, most commonly an image, on Discord's CDN.

Properties

base HttpRoute
The base URL of the asset.
final
client Nyxx
The client this asset is associated with.
final
defaultFormat CdnFormat
The default format for this asset if none is specified.
final
hash String
The hash of the asset.
final
hashCode int
The hash code for this object.
no setterinherited
isAnimated bool
Whether this asset is an animated image.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url Uri
The URL at which this asset can be fetched from.
no setter

Methods

fetch({CdnFormat? format, int? size}) Future<Uint8List>
Fetch this asset and return its binary data.
fetchStreamed({CdnFormat? format, int? size}) Stream<List<int>>
Fetch this asset and return a stream of its binary data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited